C# Class Bamboo.Prevalence.Util.SnapshotTaker

Takes periodic snapshots of a PrevalenceEngine instance and applies a clean up policy to the prevalence base folder.
Inheritance: System.IDisposable
Show file Open project: bamboo/Bamboo.Prevalence Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Cancels the snapshot taking process.

SnapshotTaker ( PrevalenceEngine engine, System.TimeSpan period ) : System

Creates a new SnapshotTaker for the PrevalenceEngine engine with a period between snapshots equals to period but with no file cleanup policy (no files will be deleted from the prevalence base folder).

SnapshotTaker ( PrevalenceEngine engine, System.TimeSpan period, ICleanUpPolicy cleanUpPolicy ) : System

Creates a new SnapshotTaker for the PrevalenceEngine engine with a period between snapshots equals to period. Files will be removed according to the specified cleanUpPolicy object.

Private Methods

Method Description
DeleteFiles ( FileInfo files ) : void
OnTimer ( object state ) : void

Method Details

Dispose() public method

Cancels the snapshot taking process.
public Dispose ( ) : void
return void

SnapshotTaker() public method

Creates a new SnapshotTaker for the PrevalenceEngine engine with a period between snapshots equals to period but with no file cleanup policy (no files will be deleted from the prevalence base folder).
public SnapshotTaker ( PrevalenceEngine engine, System.TimeSpan period ) : System
engine Bamboo.Prevalence.PrevalenceEngine prevalence engine to take snapshots from
period System.TimeSpan period between snapshots
return System

SnapshotTaker() public method

Creates a new SnapshotTaker for the PrevalenceEngine engine with a period between snapshots equals to period. Files will be removed according to the specified cleanUpPolicy object.
public SnapshotTaker ( PrevalenceEngine engine, System.TimeSpan period, ICleanUpPolicy cleanUpPolicy ) : System
engine Bamboo.Prevalence.PrevalenceEngine prevalence engine to take snapshots from
period System.TimeSpan period between snapshots
cleanUpPolicy ICleanUpPolicy clean up policy
return System