C# 클래스 DBreeze.LianaTrie.LTrieWriteCache

상속: IDisposable
파일 보기 프로젝트 열기: hhblaze/DBreeze 1 사용 예제들

공개 메소드들

메소드 설명
Commit ( byte &rootData, byte &oldRootData ) : void

Dispose ( ) : void
GenerationNodeRead ( bool useCache, byte pointer, byte cachedGenerationMapLine, int MaximumNodeLineLength ) : byte[]

GenerationNodeWritingEnd ( byte pointer, byte data ) : byte[]

If line exists - makes nothing, otherwise writes in

Writing Generation Node to the end of File. We use current generation node pointer to black list it. if we reuse this new pointer inside of one transaction for overwriting, we don't need to back it up for rollback any more.

GenerationNodeWritingOver ( byte pointer, byte newData, byte generationMapLine, byte kidsBeforeModification ) : void

OverWriting Generation Node, we supply params where, oldData and newData. Old Data - not used thou

OverWriting Generation Node, we supply params where, oldData and newData.

GetNodeKids ( byte generationMapLine ) : byte[]

Returns NULL if not found

LTrieWriteCache ( LTrie trie ) : System
ReadDynamicDataBlock ( byte &initPtr, bool useCache ) : byte[]

ReadKey ( bool useCache, byte pointer ) : byte[]

Internal function for reading key only from DB storage Is called from ReadKey

ReadKeyValue ( bool useCache, byte pointer, long &valueStartPtr, uint &valueLength, byte &key, byte &val ) : void

Interanl Function for reading Key and Value in one set. Initial block read is setUp to 4096 bytes

ReadValue ( byte pointer, bool useCache, long &valueStartPtr, uint &valueLength ) : byte[]

ReadValuePartially ( byte pointer, uint startIndex, uint length, bool useCache, long &valueStartPtr, uint &valueLength ) : byte[]

RecreateDB ( ) : void

Used by Root Node RemoveAll with key re-creation

RollBack ( ) : void

RootNodeRead ( ) : byte[]

TransactionalCommit ( byte &rootData, byte &oldRootData ) : void

TransactionalCommitFinished ( ) : void

We need here to clear old root and call Storage Commit is finished

TransactionalRollBack ( ) : void

ValueWritingEnd ( byte &data, byte oldPtr ) : byte[]

ValueWritingOver ( byte pointer, byte &oldData, byte &newData, byte &key ) : void

WriteDynamicDataBlock ( byte &initPtr, byte &data ) : byte[]

비공개 메소드들

메소드 설명
RootNodeWrite ( byte rootData ) : void

메소드 상세

Commit() 공개 메소드

public Commit ( byte &rootData, byte &oldRootData ) : void
rootData byte
oldRootData byte
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GenerationNodeRead() 공개 메소드

public GenerationNodeRead ( bool useCache, byte pointer, byte cachedGenerationMapLine, int MaximumNodeLineLength ) : byte[]
useCache bool
pointer byte
cachedGenerationMapLine byte
MaximumNodeLineLength int
리턴 byte[]

GenerationNodeWritingEnd() 공개 메소드

If line exists - makes nothing, otherwise writes in Writing Generation Node to the end of File. We use current generation node pointer to black list it. if we reuse this new pointer inside of one transaction for overwriting, we don't need to back it up for rollback any more.
public GenerationNodeWritingEnd ( byte pointer, byte data ) : byte[]
pointer byte
data byte
리턴 byte[]

GenerationNodeWritingOver() 공개 메소드

OverWriting Generation Node, we supply params where, oldData and newData. Old Data - not used thou OverWriting Generation Node, we supply params where, oldData and newData.
public GenerationNodeWritingOver ( byte pointer, byte newData, byte generationMapLine, byte kidsBeforeModification ) : void
pointer byte
newData byte
generationMapLine byte
kidsBeforeModification byte
리턴 void

GetNodeKids() 공개 메소드

Returns NULL if not found
public GetNodeKids ( byte generationMapLine ) : byte[]
generationMapLine byte
리턴 byte[]

LTrieWriteCache() 공개 메소드

public LTrieWriteCache ( LTrie trie ) : System
trie LTrie
리턴 System

ReadDynamicDataBlock() 공개 메소드

public ReadDynamicDataBlock ( byte &initPtr, bool useCache ) : byte[]
initPtr byte
useCache bool
리턴 byte[]

ReadKey() 공개 메소드

Internal function for reading key only from DB storage Is called from ReadKey
public ReadKey ( bool useCache, byte pointer ) : byte[]
useCache bool
pointer byte ptr to KVP
리턴 byte[]

ReadKeyValue() 공개 메소드

Interanl Function for reading Key and Value in one set. Initial block read is setUp to 4096 bytes
public ReadKeyValue ( bool useCache, byte pointer, long &valueStartPtr, uint &valueLength, byte &key, byte &val ) : void
useCache bool
pointer byte ptr to KVP
valueStartPtr long will be more then 0 only in case if valueLength more then 0. It makes no diff for the null and byte[0] values in this context. Avoid byte[0]
valueLength uint will be 0 if val is null and if val is byte[0]
key byte
val byte
리턴 void

ReadValue() 공개 메소드

public ReadValue ( byte pointer, bool useCache, long &valueStartPtr, uint &valueLength ) : byte[]
pointer byte ptr to KVP
useCache bool
valueStartPtr long
valueLength uint
리턴 byte[]

ReadValuePartially() 공개 메소드

public ReadValuePartially ( byte pointer, uint startIndex, uint length, bool useCache, long &valueStartPtr, uint &valueLength ) : byte[]
pointer byte
startIndex uint
length uint
useCache bool
valueStartPtr long returns pointer where value starts from. -1 if can't be determined
valueLength uint returns full value length; 0 - default
리턴 byte[]

RecreateDB() 공개 메소드

Used by Root Node RemoveAll with key re-creation
public RecreateDB ( ) : void
리턴 void

RollBack() 공개 메소드

public RollBack ( ) : void
리턴 void

RootNodeRead() 공개 메소드

public RootNodeRead ( ) : byte[]
리턴 byte[]

TransactionalCommit() 공개 메소드

public TransactionalCommit ( byte &rootData, byte &oldRootData ) : void
rootData byte
oldRootData byte
리턴 void

TransactionalCommitFinished() 공개 메소드

We need here to clear old root and call Storage Commit is finished
public TransactionalCommitFinished ( ) : void
리턴 void

TransactionalRollBack() 공개 메소드

public TransactionalRollBack ( ) : void
리턴 void

ValueWritingEnd() 공개 메소드

public ValueWritingEnd ( byte &data, byte oldPtr ) : byte[]
data byte
oldPtr byte
리턴 byte[]

ValueWritingOver() 공개 메소드

public ValueWritingOver ( byte pointer, byte &oldData, byte &newData, byte &key ) : void
pointer byte
oldData byte
newData byte
key byte
리턴 void

WriteDynamicDataBlock() 공개 메소드

public WriteDynamicDataBlock ( byte &initPtr, byte &data ) : byte[]
initPtr byte
data byte
리턴 byte[]