C# Class GSF.IO.FileStructure.Media.MemoryPoolFile

Provides a in memory stream that uses pages that are pooled in the unmanaged buffer pool.
Inheritance: GSF.IO.Unmanaged.MemoryPoolStreamCore, IDiskMediumCoreFunctions
显示文件 Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Methods

Method Description
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.

CommitChanges ( FileHeaderBlock headerBlock ) : void

Executes a commit of data. This will flush the data to the disk use the provided header data to properly execute this function.

CreateIoSession ( ) : BinaryStreamIoSessionBase

Creates a BinaryStreamIoSessionBase that can be used to read from this disk medium.

MemoryPoolFile ( MemoryPool pool ) : System

Create a new MemoryPoolFile

RollbackChanges ( ) : void

Rolls back all edits to the DiskMedium

Method Details

ChangeExtension() public method

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.
return void

ChangeShareMode() public method

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.
return void

CommitChanges() public method

Executes a commit of data. This will flush the data to the disk use the provided header data to properly execute this function.
public CommitChanges ( FileHeaderBlock headerBlock ) : void
headerBlock FileHeaderBlock
return void

CreateIoSession() public method

Creates a BinaryStreamIoSessionBase that can be used to read from this disk medium.
public CreateIoSession ( ) : BinaryStreamIoSessionBase
return GSF.IO.Unmanaged.BinaryStreamIoSessionBase

MemoryPoolFile() public method

Create a new MemoryPoolFile
public MemoryPoolFile ( MemoryPool pool ) : System
pool GSF.IO.Unmanaged.MemoryPool
return System

RollbackChanges() public method

Rolls back all edits to the DiskMedium
public RollbackChanges ( ) : void
return void