C# Class BplusDotNet.LinkedFile

Chunked singly linked file with garbage collection.
Show file Open project: benaston/BTree Class Usage Examples

Public Properties

Property Type Description
BUFFEROVERHEAD int
HEADERPREFIX byte[]
MINBUFFERSIZE int
VERSION byte

Public Methods

Method Description
Flush ( ) : void
GetChunk ( long HeadBufferNumber ) : byte[]
InitializeLinkedFileInStream ( System fromfile, int buffersize ) : LinkedFile
InitializeLinkedFileInStream ( System fromfile, int buffersize, long StartSeek ) : LinkedFile
LinkedFile ( int buffersize, long seekStart ) : System
Recover ( Hashtable ChunksInUse, bool FixErrors ) : void
ReleaseBuffers ( long HeadBufferNumber ) : void
SetupFromExistingStream ( System fromfile ) : LinkedFile
SetupFromExistingStream ( System fromfile, long StartSeek ) : LinkedFile
Shutdown ( ) : void
StoreNewChunk ( byte fromArray, int startingAt, int length ) : long
checkStructure ( ) : void
checkStructure ( Hashtable ChunksInUse, bool FixErrors ) : void
makeHeader ( ) : byte[]
setHeader ( ) : void

Private Methods

Method Description
AllocateBuffer ( ) : long
DeallocateBuffer ( long buffernumber ) : void
ParseBuffer ( long bufferNumber, byte &type, long &nextBufferNumber ) : byte[]
SetBuffer ( long buffernumber, byte type, byte thebuffer, int start, int length, long NextBufferNumber ) : void
readHeader ( ) : void
sanityCheck ( ) : void

Method Details

Flush() public method

public Flush ( ) : void
return void

GetChunk() public method

public GetChunk ( long HeadBufferNumber ) : byte[]
HeadBufferNumber long
return byte[]

InitializeLinkedFileInStream() public static method

public static InitializeLinkedFileInStream ( System fromfile, int buffersize ) : LinkedFile
fromfile System
buffersize int
return LinkedFile

InitializeLinkedFileInStream() public static method

public static InitializeLinkedFileInStream ( System fromfile, int buffersize, long StartSeek ) : LinkedFile
fromfile System
buffersize int
StartSeek long
return LinkedFile

LinkedFile() public method

public LinkedFile ( int buffersize, long seekStart ) : System
buffersize int
seekStart long
return System

Recover() public method

public Recover ( Hashtable ChunksInUse, bool FixErrors ) : void
ChunksInUse System.Collections.Hashtable
FixErrors bool
return void

ReleaseBuffers() public method

public ReleaseBuffers ( long HeadBufferNumber ) : void
HeadBufferNumber long
return void

SetupFromExistingStream() public static method

public static SetupFromExistingStream ( System fromfile ) : LinkedFile
fromfile System
return LinkedFile

SetupFromExistingStream() public static method

public static SetupFromExistingStream ( System fromfile, long StartSeek ) : LinkedFile
fromfile System
StartSeek long
return LinkedFile

Shutdown() public method

public Shutdown ( ) : void
return void

StoreNewChunk() public method

public StoreNewChunk ( byte fromArray, int startingAt, int length ) : long
fromArray byte
startingAt int
length int
return long

checkStructure() public method

public checkStructure ( ) : void
return void

checkStructure() public method

public checkStructure ( Hashtable ChunksInUse, bool FixErrors ) : void
ChunksInUse System.Collections.Hashtable
FixErrors bool
return void

makeHeader() public method

public makeHeader ( ) : byte[]
return byte[]

setHeader() public method

public setHeader ( ) : void
return void

Property Details

BUFFEROVERHEAD public static property

public static int BUFFEROVERHEAD
return int

HEADERPREFIX public static property

public static byte[] HEADERPREFIX
return byte[]

MINBUFFERSIZE public static property

public static int MINBUFFERSIZE
return int

VERSION public static property

public static byte VERSION
return byte