C# Class Goedel.Persistence.LogPersistenceStore

A persistence store based on an append-only log.
Inheritance: PersistenceStore
Exibir arquivo Open project: hallambaker/Mathematical-Mesh Class Usage Examples

Public Methods

Method Description
LogPersistenceStore ( string FileName ) : System

Open a persistence store with the specified file name in read only mode.

LogPersistenceStore ( string FileName, bool ReadOnly, string Type, string Comment ) : System

Open or create a persistence store in specified mode with the specified file name, content type and optional comment.

LogPersistenceStore ( string FileName, string Type, string Comment ) : System

Open or create a persistence store in read/write mode with the specified file name, content type and optional comment.

Protected Methods

Method Description
Init ( string FileName, bool ReadOnly, string Type, string Comment ) : void

Initialization method. May be called by subclasses.

pStore ( DataItem DataItem ) : void

Virtual method that is called by the management class to perform the actual write operation to the store. Note that the caller is responsible for ensuring all necessary locks are acquired to ensure thread safety.

Private Methods

Method Description
MakeHeader ( string Type, string Comment ) : void
Read ( ) : void
ReadRecord ( JSONReader JSONReader ) : LogEntry
Write ( LogEntry LogEntry ) : void

Method Details

Init() protected method

Initialization method. May be called by subclasses.
protected Init ( string FileName, bool ReadOnly, string Type, string Comment ) : void
FileName string Log file.
ReadOnly bool If true, persistence store must exist /// and will be opened in read-only mode. If false, persistence store /// is opened in read/write mode and a new store will be created /// if none exists.
Type string Type of data to store (the schema name).
Comment string Comment to be written to the log.
return void

LogPersistenceStore() public method

Open a persistence store with the specified file name in read only mode.
public LogPersistenceStore ( string FileName ) : System
FileName string Log file.
return System

LogPersistenceStore() public method

Open or create a persistence store in specified mode with the specified file name, content type and optional comment.
public LogPersistenceStore ( string FileName, bool ReadOnly, string Type, string Comment ) : System
FileName string Log file.
ReadOnly bool If true, persistence store must exist /// and will be opened in read-only mode. If false, persistence store /// is opened in read/write mode and a new store will be created /// if none exists.
Type string Type of data to store (the schema name).
Comment string Comment to be written to the log.
return System

LogPersistenceStore() public method

Open or create a persistence store in read/write mode with the specified file name, content type and optional comment.
public LogPersistenceStore ( string FileName, string Type, string Comment ) : System
FileName string Log file.
Type string Type of data to store (the schema name).
Comment string Comment to be written to the log.
return System

pStore() protected method

Virtual method that is called by the management class to perform the actual write operation to the store. Note that the caller is responsible for ensuring all necessary locks are acquired to ensure thread safety.
protected pStore ( DataItem DataItem ) : void
DataItem DataItem The data to be written.
return void