C# Class GSF.Snap.Services.ArchiveListLog

Contains the Pending Deletions for the ArchiveList{TKey,TValue}. This class is thread safe.
Inheritance: GSF.Diagnostics.DisposableLoggingClassBase
Show file Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Methods

Method Description
AddFileToDelete ( System.Guid archiveId ) : void

Appends the specified file to the list of files that should be deleted.

ArchiveListLog ( ArchiveListLogSettings settings = null ) : System

Creates a log that monitors pending deletions.

ClearCompletedLogs ( HashSet allFiles ) : void

Removes any log that is no longer valid from this list.

SaveLogToDisk ( ) : void

If the log is file backed

ShouldBeDeleted ( System.Guid fileId ) : bool

Gets if the specified file Id should be deleted based on the delete log.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

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

Private Methods

Method Description
GetAllFilesToDelete ( ) : HashSet

Verify that none of the pending deletion files exist in the editor.

Method Details

AddFileToDelete() public method

Appends the specified file to the list of files that should be deleted.
public AddFileToDelete ( System.Guid archiveId ) : void
archiveId System.Guid
return void

ArchiveListLog() public method

Creates a log that monitors pending deletions.
public ArchiveListLog ( ArchiveListLogSettings settings = null ) : System
settings ArchiveListLogSettings Optional settings for the log. If none are specified, the default will not load the settings.
return System

ClearCompletedLogs() public method

Removes any log that is no longer valid from this list.
public ClearCompletedLogs ( HashSet allFiles ) : void
allFiles HashSet
return void

Dispose() protected method

Releases the unmanaged resources used by the ArchiveListLog 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

SaveLogToDisk() public method

If the log is file backed
public SaveLogToDisk ( ) : void
return void

ShouldBeDeleted() public method

Gets if the specified file Id should be deleted based on the delete log.
public ShouldBeDeleted ( System.Guid fileId ) : bool
fileId System.Guid the id of the file.
return bool