C# 클래스 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.
상속: IDisposable
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
OnTransactionCommitted ( ) : void
OnTransactionRolledBack ( ) : void
TransactionalFileStructure ( DiskIo diskIo ) : System

메소드 상세

BeginEdit() 공개 메소드

This will start a transactional edit on the file.
public BeginEdit ( ) : TransactionalEdit
리턴 TransactionalEdit

ChangeExtension() 공개 메소드

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.
리턴 void

ChangeShareMode() 공개 메소드

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.
리턴 void

CreateFile() 공개 정적인 메소드

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

CreateInMemory() 공개 정적인 메소드

Creates a new archive file that is completely in memory
public static CreateInMemory ( int blockSize ) : TransactionalFileStructure
blockSize int
리턴 TransactionalFileStructure

Dispose() 공개 메소드

Releases all the resources used by the TransactionalFileStructure object.
public Dispose ( ) : void
리턴 void

OpenFile() 공개 정적인 메소드

Opens an existing file.
public static OpenFile ( string fileName, bool isReadOnly ) : TransactionalFileStructure
fileName string
isReadOnly bool
리턴 TransactionalFileStructure