OutageLog Class

Represents a persisted log of outages as a list of start and stop times.

Definition

Namespace: Gemstone.IO
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.136 -- Release Build+d454dafd53fcce88fce9c0a8ec8597176c30b791
public class OutageLog : IProvideStatus, IDisposable
Inheritance
Object    OutageLog
Implements
IProvideStatus, IDisposable

Remarks

This class serializes a list of outages (e.g., a connection outage or data loss) where each outage consists of a start and end time. The outages are persisted in a log file so that the log can be operated on even through host application restarts until the outages are processed.

All members in the OutageLog are guaranteed to be thread safe. File locks are used to provide synchronization so that the file can stay up-to-date with changes made in the application.

Constructors

OutageLog Creates a new OutageLog.

Properties

Count Gets the number of outages in the log.
FileName Gets or sets the file name for the outage log; file name can be set with a relative path.
IsDisposed Gets a flag that indicates whether the object has been disposed.
Outages Gets the full list of outages in the log.
Status Gets the current status details about OutageLog.

Methods

Add(Outage) Adds an outage to the OutageLog.
Add(DateTimeOffset, DateTimeOffset) Adds an outage to the OutageLog.
Dispose Releases all the resources used by the OutageLog object.
Dispose(Boolean) Releases the unmanaged resources used by the OutageLog object and optionally releases the managed resources.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Releases the unmanaged resources before the OutageLog object is reclaimed by GC.
(Overrides ObjectFinalize)
First Gets the first outage in the list of outages.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Initialize Initialize the outage log.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Remove Removes the given outage from the outage log.
ToStringReturns a string that represents the current object.
(Inherited from Object)

Events

Disposed Raised after the outage log has been properly disposed.
LogModified Event is raised when the outage log is modified.
ProcessException Event is raised when there is an exception encountered while processing outage log.

Fields

DateTimeFormat Date-time format used by OutageLog.

Extension Methods

GetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
GetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)

See Also