C# Class GSF.Snap.Services.ArchiveListEditor

Provides a way to edit an ArchiveList since all edits must be atomic. WARNING: Instancing this class on an ArchiveList will lock the class until Dispose is called. Therefore, keep locks to a minimum and always use a Using block.
Inheritance: IDisposable
Mostra file Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Methods

Method Description
Contains ( System.Guid archiveId ) : bool

Returns true if the archive list contains the provided file.

Dispose ( ) : void

Releases all the resources used by the ArchiveListEditor object.

RenewArchiveSnapshot ( System.Guid archiveId ) : void

Renews the snapshot of the archive file. This will acquire the latest read transaction so all new snapshots will use this later version.

TryRemoveAndDelete ( System.Guid archiveId ) : bool

Removes the supplied file from the ArchiveList{TKey,TValue} and queues it for deletion.

TryRemoveAndDispose ( System.Guid archiveId ) : bool

Removes the archiveId from ArchiveList{TKey,TValue} and queues it for disposal.

Also unlocks the archive file.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the ArchiveListEditor object and optionally releases the managed resources.

Method Details

Contains() public abstract method

Returns true if the archive list contains the provided file.
public abstract Contains ( System.Guid archiveId ) : bool
archiveId System.Guid the file
return bool

Dispose() public method

Releases all the resources used by the ArchiveListEditor object.
public Dispose ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources used by the ArchiveListEditor object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

RenewArchiveSnapshot() public abstract method

Renews the snapshot of the archive file. This will acquire the latest read transaction so all new snapshots will use this later version.
public abstract RenewArchiveSnapshot ( System.Guid archiveId ) : void
archiveId System.Guid the ID of the archive snapshot to renew
return void

TryRemoveAndDelete() public abstract method

Removes the supplied file from the ArchiveList{TKey,TValue} and queues it for deletion.
public abstract TryRemoveAndDelete ( System.Guid archiveId ) : bool
archiveId System.Guid file to remove and delete.
return bool

TryRemoveAndDispose() public abstract method

Removes the archiveId from ArchiveList{TKey,TValue} and queues it for disposal.
Also unlocks the archive file.
public abstract TryRemoveAndDispose ( System.Guid archiveId ) : bool
archiveId System.Guid the archive to remove
return bool