C# Class GSF.IO.FileStructure.TransactionalFileStructure

This class is responsible for managing the transactions that occur on the file system. Therefore, it keeps up with the latest snapshot of the file allocation table, permits only a single concurrent edit of the archive system, and determines when a file can be deleted when there are no read or write transactions. It also containst the IO system.
Inheritance: IDisposable
Afficher le fichier Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Méthodes publiques

Méthode Description
BeginEdit ( ) : TransactionalEdit

This will start a transactional edit on the file.

ChangeExtension ( string extension, bool isReadOnly, bool isSharingEnabled ) : void

Changes the extension of the current file.

ChangeShareMode ( bool isReadOnly, bool isSharingEnabled ) : void

Reopens the file with different permissions.

CreateFile ( string fileName, int blockSize ) : TransactionalFileStructure

Creates a new archive file using the provided file. File is editable.

CreateInMemory ( int blockSize ) : TransactionalFileStructure

Creates a new archive file that is completely in memory

Dispose ( ) : void

Releases all the resources used by the TransactionalFileStructure object.

OpenFile ( string fileName, bool isReadOnly ) : TransactionalFileStructure

Opens an existing file.

Private Methods

Méthode Description
OnTransactionCommitted ( ) : void
OnTransactionRolledBack ( ) : void
TransactionalFileStructure ( DiskIo diskIo ) : System

Method Details

BeginEdit() public méthode

This will start a transactional edit on the file.
public BeginEdit ( ) : TransactionalEdit
Résultat TransactionalEdit

ChangeExtension() public méthode

Changes the extension of the current file.
public ChangeExtension ( string extension, bool isReadOnly, bool isSharingEnabled ) : void
extension string the new extension
isReadOnly bool If the file should be reopened as readonly
isSharingEnabled bool If the file should share read privileges.
Résultat void

ChangeShareMode() public méthode

Reopens the file with different permissions.
public ChangeShareMode ( bool isReadOnly, bool isSharingEnabled ) : void
isReadOnly bool If the file should be reopened as readonly
isSharingEnabled bool If the file should share read privileges.
Résultat void

CreateFile() public static méthode

Creates a new archive file using the provided file. File is editable.
public static CreateFile ( string fileName, int blockSize ) : TransactionalFileStructure
fileName string
blockSize int
Résultat TransactionalFileStructure

CreateInMemory() public static méthode

Creates a new archive file that is completely in memory
public static CreateInMemory ( int blockSize ) : TransactionalFileStructure
blockSize int
Résultat TransactionalFileStructure

Dispose() public méthode

Releases all the resources used by the TransactionalFileStructure object.
public Dispose ( ) : void
Résultat void

OpenFile() public static méthode

Opens an existing file.
public static OpenFile ( string fileName, bool isReadOnly ) : TransactionalFileStructure
fileName string
isReadOnly bool
Résultat TransactionalFileStructure