C# Class DBreeze.LianaTrie.LTrieGenerationNode

Show file Open project: hhblaze/DBreeze Class Usage Examples

Public Properties

Property Type Description
KidsBeforeModification byte[]
KidsInNode LTrieKidsInNode
Pointer byte[]
ToChangeParentNode bool
ToRemoveFromParentNode bool
ToWrite bool
Value byte

Public Methods

Method Description
GetKidAsValue ( bool searchForAValue, int kid ) : LTrieKid
LTrieGenerationNode ( LTrieRootNode rootNode ) : System
ReadSelf ( bool useCache, byte generationMapLine ) : void
RemoveAllKids ( ) : void
RemoveKid ( byte kid, bool lastElementOfTheKey, byte &key, bool &WasRemoved, bool retrieveDeletedValue, byte &deletedValue ) : bool

Pointer to the removing key value can be null, if such key never existed

RemoveKidPointer ( byte kid ) : void
SetupKidPointer ( byte kid, byte ptr ) : void
SetupKidWithValue ( byte kid, bool lastElementOfTheKey, byte &fullKey, byte &value, bool useExistingPointerToValue, bool &WasUpdated, bool dontUpdateIfExists ) : LTrieSetupKidResult

SetupKidWithValuePartially ( byte kid, bool lastElementOfTheKey, byte &fullKey, byte &value, bool useExistingPointerToValue, uint startIndex, long &valueStartPtr, bool &WasUpdated ) : LTrieSetupKidResult
WriteSelf ( byte generationMapLine ) : void

Private Methods

Method Description
GetQuantityOfReservationSlots ( ) : int

Calculating Quantity of Reservations slots for 0 and 1 Evolutions.

TryOverWriteValue ( byte ptr, byte &value, byte &fullKey ) : byte[]

Returns pointer to the newly stored value

TryOverWriteValuePartially ( byte ptr, byte &value, byte &fullKey, uint startIndex, long &valueStartPtr ) : byte[]

Returns pointer to the newly stored value

WriteKidValue ( byte &fullKey, byte &value, bool tryToOverwrite, byte overWritePointer ) : byte[]
WriteKidValuePartially ( byte &fullKey, byte &value, bool tryToOverwrite, byte overWritePointer, uint startIndex, long &valueStartPtr ) : byte[]

Method Details

GetKidAsValue() public method

public GetKidAsValue ( bool searchForAValue, int kid ) : LTrieKid
searchForAValue bool
kid int
return LTrieKid

LTrieGenerationNode() public method

public LTrieGenerationNode ( LTrieRootNode rootNode ) : System
rootNode LTrieRootNode
return System

ReadSelf() public method

public ReadSelf ( bool useCache, byte generationMapLine ) : void
useCache bool
generationMapLine byte
return void

RemoveAllKids() public method

public RemoveAllKids ( ) : void
return void

RemoveKid() public method

Pointer to the removing key value can be null, if such key never existed
public RemoveKid ( byte kid, bool lastElementOfTheKey, byte &key, bool &WasRemoved, bool retrieveDeletedValue, byte &deletedValue ) : bool
kid byte
lastElementOfTheKey bool
key byte
WasRemoved bool indicates that value existed if true
retrieveDeletedValue bool indicates if we must also return deleted value
deletedValue byte
return bool

RemoveKidPointer() public method

public RemoveKidPointer ( byte kid ) : void
kid byte
return void

SetupKidPointer() public method

public SetupKidPointer ( byte kid, byte ptr ) : void
kid byte
ptr byte
return void

SetupKidWithValue() public method

public SetupKidWithValue ( byte kid, bool lastElementOfTheKey, byte &fullKey, byte &value, bool useExistingPointerToValue, bool &WasUpdated, bool dontUpdateIfExists ) : LTrieSetupKidResult
kid byte
lastElementOfTheKey bool
fullKey byte
value byte
useExistingPointerToValue bool
WasUpdated bool true means that value existed and was updated
dontUpdateIfExists bool When true - if value exists, we dont update it. If WasUpdated = true then we value exists, if false - we have inserted new one
return LTrieSetupKidResult

SetupKidWithValuePartially() public method

public SetupKidWithValuePartially ( byte kid, bool lastElementOfTheKey, byte &fullKey, byte &value, bool useExistingPointerToValue, uint startIndex, long &valueStartPtr, bool &WasUpdated ) : LTrieSetupKidResult
kid byte
lastElementOfTheKey bool
fullKey byte
value byte
useExistingPointerToValue bool
startIndex uint
valueStartPtr long
WasUpdated bool
return LTrieSetupKidResult

WriteSelf() public method

public WriteSelf ( byte generationMapLine ) : void
generationMapLine byte
return void

Property Details

KidsBeforeModification public property

Field which contains either null (if Generation node is empty and had no kids) or value in format of prepared for Save Kids, in case if ReadOutExistingNode.
public byte[] KidsBeforeModification
return byte[]

KidsInNode public property

public LTrieKidsInNode,DBreeze.LianaTrie KidsInNode
return LTrieKidsInNode

Pointer public property

public byte[] Pointer
return byte[]

ToChangeParentNode public property

When New Node is created it's true After Reading Node it must become false, After WriteSelf it will be or true or false.
public bool ToChangeParentNode
return bool

ToRemoveFromParentNode public property

public bool ToRemoveFromParentNode
return bool

ToWrite public property

public bool ToWrite
return bool

Value public property

public byte Value
return byte