C# Class GSF.IO.FileStructure.ShadowCopyAllocator

This class will make shadow copies of blocks or, if the block has never been written to, prepare the block to be written to.
Inheritance: IndexParser
Mostra file Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Methods

Method Description
ShadowCopyAllocator ( SubFileDiskIoSessionPool ioSessions ) : System

Creates a ShadowCopyAllocator that is used make shadow copies of blocks.

VirtualToShadowPagePhysical ( uint positionIndex, bool &wasShadowed ) : uint

This will make a shadow copy of the block that contains the position provided. If the block does not exist, space is allocated and the indexes are set up to allow the block to be writen to.

Calling this function automatically updates the underlying parser.

Private Methods

Method Description
ReadThenWriteIndexIndirectBlock ( uint sourceBlockAddress, uint destinationBlockAddress, uint indexValue, BlockType blockType, int remoteAddressOffset, uint remoteBlockAddress ) : void

Makes a shadow copy of an index indirect block and updates a remote address.

ShadowCopyDataCluster ( uint sourceClusterAddress, uint indexValue, uint destinationClusterAddress ) : void

Makes a shadow copy of a data cluster.

ShadowCopyIndexIndirect ( uint &sourceBlockAddress, uint indexValue, BlockType blockType, int remoteAddressOffset, uint remoteBlockAddress ) : bool

Makes a shadow copy of the indirect index passed to this function. If the block does not exists, it creates it.

ShadowCopyIndexIndirectBlocks ( ) : void
TryShadowCopyDataBlock ( ) : bool

Makes a copy of the data block. Returns true if a copy was made. False if no copy was made

WriteIndexIndirectBlock ( byte pointer, int remoteAddressOffset, uint remoteBlockAddress ) : void

Writes an Indirect Block to the drive. This sets the indexIndirectNumber and updates one of the addresses within this index.

Method Details

ShadowCopyAllocator() public method

Creates a ShadowCopyAllocator that is used make shadow copies of blocks.
public ShadowCopyAllocator ( SubFileDiskIoSessionPool ioSessions ) : System
ioSessions SubFileDiskIoSessionPool
return System

VirtualToShadowPagePhysical() public method

This will make a shadow copy of the block that contains the position provided. If the block does not exist, space is allocated and the indexes are set up to allow the block to be writen to.
Calling this function automatically updates the underlying parser.
public VirtualToShadowPagePhysical ( uint positionIndex, bool &wasShadowed ) : uint
positionIndex uint The position the application intents to write to.
wasShadowed bool
return uint