2 // This file is part of the LWES .NET Binding (LWES.net)
4 // COPYRIGHT (C) 2009, Phillip Clark (cerebralkungfu[at*g mail[dot*com)
5 // original .NET implementation
7 // LWES.net is free software: you can redistribute it and/or modify
8 // it under the terms of the Lesser GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // LWES.net is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the Lesser GNU General Public License
18 // along with LWES.net. If not, see <http://www.gnu.org/licenses/>.
20 namespace Org
.Lwes
.Journaler
23 using System
.Collections
.Generic
;
26 using System
.Threading
;
28 using Org
.Lwes
.Properties
;
31 /// Base class implementation for journalers.
33 public abstract class JournalerBase
: IJournaler
37 Status
<JournalerState
> _status
;
44 /// Finalizes the journaler.
51 #endregion Constructors
56 /// Gets the status of the journaler.
58 public JournalerState Status
60 get { return _status.CurrentState; }
68 /// Disposes of the journaler.
73 GC
.SuppressFinalize(this);
77 /// Initializes the journaler.
79 public void Initialize()
81 if (!_status
.SetStateIfLessThan(JournalerState
.Initializing
, JournalerState
.Initializing
))
82 throw new InvalidOperationException(Resources
.Error_AlreadyInitialized
);
86 /// Starts the journaler.
90 throw new NotImplementedException();
94 /// Stops the journaler.
98 throw new NotImplementedException();
101 private void Dispose(bool disposing
)
103 _status
.SetStateIfLessThan(JournalerState
.Disposed
, JournalerState
.Disposed
);