C# 클래스 DBreeze.LianaTrie.LTrie

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

공개 프로퍼티들

프로퍼티 타입 설명
ValuesLazyLoadingIsOn bool

공개 메소드들

메소드 설명
Add ( byte key, byte value ) : byte[]

Adds key. Overload without refs

Add ( byte &key, byte &value, bool &WasUpdated ) : byte[]
Add ( byte &key, byte &value, bool &WasUpdated, bool dontUpdateIfExists ) : byte[]

Adds key

AddPartially ( byte key, byte value, uint startIndex, long &valueStartPtr ) : byte[]

Overload without refs

AddPartially ( byte &key, byte &value, uint startIndex, long &valueStartPtr, bool &WasUpdated ) : byte[]

REMEMBER THAT all keys are first formed in memory and then copied to the disk, so it's not for storing movies inside of the value. For storing movies (BLOBs) will be used other approach, see docu.

ChangeKey ( byte &oldKey, byte &newKey ) : void
ChangeKey ( byte &oldKey, byte &newKey, byte &ptrToNewKey, bool &WasChanged ) : void
Commit ( ) : void
Count ( ITrieRootNode readRootNode ) : ulong

Can be used inside of DBreeze - concerns all read functions

Count ( bool useCache ) : ulong

if useCache = true; uses newly created root node, else uses writing root node

Dispose ( ) : void
GetKey ( byte &key, ITrieRootNode readRootNode ) : LTrieRow

DBreeze compatible. Extension, which helps to READ-THREADS smartly utilize created before read-roots

GetKey ( byte key, bool useCache ) : LTrieRow

if useCache = true; uses newly created root node, else uses writing root node

GetTable ( LTrieRow row, byte &btKey, uint tableIndex, LTrie masterTrie, bool insertTable, bool useCache ) : NestedTable

GetTrieReadNode ( long &dtTableFixed ) : ITrieRootNode

Interface function which recreates every time new rootNode from itself by every new function call. and also packs root node last fixation dateTime (ROLL or COMMIT). It will be used for READ FUNC's via Transaction, they can decide if to create new instance of read root or use existing. Returns NULL is !TableIsOperable.

ITRCommit ( ) : void
ITRCommitFinished ( ) : void
ITRRollBack ( ) : void
InsertDataBlock ( byte &initialPtr, byte &data ) : byte[]
IterateBackward ( ) : IEnumerable
IterateBackward ( ITrieRootNode readRootNode ) : IEnumerable
IterateBackward ( bool useCache ) : IEnumerable
IterateBackwardForMaximal ( ) : LTrieRow
IterateBackwardForMaximal ( ITrieRootNode readRootNode ) : LTrieRow
IterateBackwardForMaximal ( bool useCache ) : LTrieRow
IterateBackwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey ) : IEnumerable
IterateBackwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, ITrieRootNode readRootNode ) : IEnumerable
IterateBackwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, bool useCache ) : IEnumerable
IterateBackwardSkip ( ulong skippingQuantity ) : IEnumerable
IterateBackwardSkip ( ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
IterateBackwardSkip ( ulong skippingQuantity, bool useCache ) : IEnumerable
IterateBackwardSkipFrom ( byte key, ulong skippingQuantity ) : IEnumerable
IterateBackwardSkipFrom ( byte key, ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
IterateBackwardSkipFrom ( byte key, ulong skippingQuantity, bool useCache ) : IEnumerable
IterateBackwardStartFrom ( byte key, bool includeStartKey ) : IEnumerable
IterateBackwardStartFrom ( byte key, bool includeStartKey, ITrieRootNode readRootNode ) : IEnumerable
IterateBackwardStartFrom ( byte key, bool includeStartKey, bool useCache ) : IEnumerable
IterateBackwardStartsWith ( byte startKey ) : IEnumerable
IterateBackwardStartsWith ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable
IterateBackwardStartsWith ( byte startKey, bool useCache ) : IEnumerable
IterateBackwardStartsWithClosestToPrefix ( byte startKey ) : IEnumerable

IterateBackwardStartsWithClosestToPrefix ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable

IterateBackwardStartsWithClosestToPrefix ( byte startKey, bool useCache ) : IEnumerable

IterateForward ( ) : IEnumerable
IterateForward ( ITrieRootNode readRootNode ) : IEnumerable
IterateForward ( bool useCache ) : IEnumerable
IterateForwardForMinimal ( ) : LTrieRow
IterateForwardForMinimal ( ITrieRootNode readRootNode ) : LTrieRow
IterateForwardForMinimal ( bool useCache ) : LTrieRow
IterateForwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey ) : IEnumerable
IterateForwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, ITrieRootNode readRootNode ) : IEnumerable
IterateForwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, bool useCache ) : IEnumerable
IterateForwardSkip ( ulong skippingQuantity ) : IEnumerable
IterateForwardSkip ( ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
IterateForwardSkip ( ulong skippingQuantity, bool useCache ) : IEnumerable
IterateForwardSkipFrom ( byte key, ulong skippingQuantity ) : IEnumerable
IterateForwardSkipFrom ( byte key, ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
IterateForwardSkipFrom ( byte key, ulong skippingQuantity, bool useCache ) : IEnumerable
IterateForwardStartFrom ( byte key, bool includeStartKey ) : IEnumerable
IterateForwardStartFrom ( byte key, bool includeStartKey, ITrieRootNode readRootNode ) : IEnumerable
IterateForwardStartFrom ( byte key, bool includeStartKey, bool useCache ) : IEnumerable
IterateForwardStartsWith ( byte startKey ) : IEnumerable

Always creates new root to get committed data

IterateForwardStartsWith ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable
IterateForwardStartsWith ( byte startKey, bool useCache ) : IEnumerable
IterateForwardStartsWithClosestToPrefix ( byte startKey ) : IEnumerable

IterateForwardStartsWithClosestToPrefix ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable

IterateForwardStartsWithClosestToPrefix ( byte startKey, bool useCache ) : IEnumerable

LTrie ( IStorage storage ) : System

Liana Trie

ModificationThreadId ( int transactionThreadId ) : void
Remove ( byte &key ) : void
Remove ( byte &key, bool &WasRemoved, bool retrieveDeletedValue, byte &deletedValue ) : void

Removes the key

RemoveAll ( bool withFileRecreation ) : void
RollBack ( ) : void

RollBack

SelectDataBlock ( byte &initialPtr, bool useCache ) : byte[]
SingleCommit ( ) : void

Wrapper for ITransactable

SingleRollback ( ) : void

Wrapper for ITransactable

TransactionIsFinished ( int transactionThreadId ) : void

비공개 메소드들

메소드 설명
CheckTableIsOperable ( ) : void

Will return exception, if not. Must be called by all functions

SaveGenerationMap ( ) : void

Technical function. Used by Fetch SYNCHRO_READ FUNCs, which use write root node, to make last in-memory changes to flash on the disk, before commit.

메소드 상세

Add() 공개 메소드

Adds key. Overload without refs
public Add ( byte key, byte value ) : byte[]
key byte
value byte
리턴 byte[]

Add() 공개 메소드

public Add ( byte &key, byte &value, bool &WasUpdated ) : byte[]
key byte
value byte
WasUpdated bool
리턴 byte[]

Add() 공개 메소드

Adds key
public Add ( byte &key, byte &value, bool &WasUpdated, bool dontUpdateIfExists ) : byte[]
key byte
value byte
WasUpdated bool indicates that key we insert, already existed in the system 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
리턴 byte[]

AddPartially() 공개 메소드

Overload without refs
public AddPartially ( byte key, byte value, uint startIndex, long &valueStartPtr ) : byte[]
key byte
value byte
startIndex uint
valueStartPtr long
리턴 byte[]

AddPartially() 공개 메소드

REMEMBER THAT all keys are first formed in memory and then copied to the disk, so it's not for storing movies inside of the value. For storing movies (BLOBs) will be used other approach, see docu.
public AddPartially ( byte &key, byte &value, uint startIndex, long &valueStartPtr, bool &WasUpdated ) : byte[]
key byte
value byte
startIndex uint
valueStartPtr long
WasUpdated bool
리턴 byte[]

ChangeKey() 공개 메소드

public ChangeKey ( byte &oldKey, byte &newKey ) : void
oldKey byte
newKey byte
리턴 void

ChangeKey() 공개 메소드

public ChangeKey ( byte &oldKey, byte &newKey, byte &ptrToNewKey, bool &WasChanged ) : void
oldKey byte
newKey byte
ptrToNewKey byte
WasChanged bool
리턴 void

Commit() 공개 메소드

public Commit ( ) : void
리턴 void

Count() 공개 메소드

Can be used inside of DBreeze - concerns all read functions
public Count ( ITrieRootNode readRootNode ) : ulong
readRootNode ITrieRootNode
리턴 ulong

Count() 공개 메소드

if useCache = true; uses newly created root node, else uses writing root node
public Count ( bool useCache ) : ulong
useCache bool
리턴 ulong

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetKey() 공개 메소드

DBreeze compatible. Extension, which helps to READ-THREADS smartly utilize created before read-roots
public GetKey ( byte &key, ITrieRootNode readRootNode ) : LTrieRow
key byte
readRootNode ITrieRootNode if null then WRITE-ROOT NODE
리턴 LTrieRow

GetKey() 공개 메소드

if useCache = true; uses newly created root node, else uses writing root node
public GetKey ( byte key, bool useCache ) : LTrieRow
key byte
useCache bool
리턴 LTrieRow

GetTable() 공개 메소드

public GetTable ( LTrieRow row, byte &btKey, uint tableIndex, LTrie masterTrie, bool insertTable, bool useCache ) : NestedTable
row LTrieRow
btKey byte
tableIndex uint
masterTrie LTrie
insertTable bool Regulates if InsertTable or SelectTable was called (ability to create table if it doesn't exist)
useCache bool Regulates READ table thread or WRITE table thread - visibilityscope
리턴 NestedTable

GetTrieReadNode() 공개 메소드

Interface function which recreates every time new rootNode from itself by every new function call. and also packs root node last fixation dateTime (ROLL or COMMIT). It will be used for READ FUNC's via Transaction, they can decide if to create new instance of read root or use existing. Returns NULL is !TableIsOperable.
public GetTrieReadNode ( long &dtTableFixed ) : ITrieRootNode
dtTableFixed long
리턴 ITrieRootNode

ITRCommit() 공개 메소드

public ITRCommit ( ) : void
리턴 void

ITRCommitFinished() 공개 메소드

public ITRCommitFinished ( ) : void
리턴 void

ITRRollBack() 공개 메소드

public ITRRollBack ( ) : void
리턴 void

InsertDataBlock() 공개 메소드

public InsertDataBlock ( byte &initialPtr, byte &data ) : byte[]
initialPtr byte
data byte
리턴 byte[]

IterateBackward() 공개 메소드

public IterateBackward ( ) : IEnumerable
리턴 IEnumerable

IterateBackward() 공개 메소드

public IterateBackward ( ITrieRootNode readRootNode ) : IEnumerable
readRootNode ITrieRootNode
리턴 IEnumerable

IterateBackward() 공개 메소드

public IterateBackward ( bool useCache ) : IEnumerable
useCache bool
리턴 IEnumerable

IterateBackwardForMaximal() 공개 메소드

public IterateBackwardForMaximal ( ) : LTrieRow
리턴 LTrieRow

IterateBackwardForMaximal() 공개 메소드

public IterateBackwardForMaximal ( ITrieRootNode readRootNode ) : LTrieRow
readRootNode ITrieRootNode
리턴 LTrieRow

IterateBackwardForMaximal() 공개 메소드

public IterateBackwardForMaximal ( bool useCache ) : LTrieRow
useCache bool
리턴 LTrieRow

IterateBackwardFromTo() 공개 메소드

public IterateBackwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey ) : IEnumerable
startKey byte
stopKey byte
includeStartKey bool
includeStopKey bool
리턴 IEnumerable

IterateBackwardFromTo() 공개 메소드

public IterateBackwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, ITrieRootNode readRootNode ) : IEnumerable
startKey byte
stopKey byte
includeStartKey bool
includeStopKey bool
readRootNode ITrieRootNode
리턴 IEnumerable

IterateBackwardFromTo() 공개 메소드

public IterateBackwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, bool useCache ) : IEnumerable
startKey byte
stopKey byte
includeStartKey bool
includeStopKey bool
useCache bool
리턴 IEnumerable

IterateBackwardSkip() 공개 메소드

public IterateBackwardSkip ( ulong skippingQuantity ) : IEnumerable
skippingQuantity ulong
리턴 IEnumerable

IterateBackwardSkip() 공개 메소드

public IterateBackwardSkip ( ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
skippingQuantity ulong
readRootNode ITrieRootNode
리턴 IEnumerable

IterateBackwardSkip() 공개 메소드

public IterateBackwardSkip ( ulong skippingQuantity, bool useCache ) : IEnumerable
skippingQuantity ulong
useCache bool
리턴 IEnumerable

IterateBackwardSkipFrom() 공개 메소드

public IterateBackwardSkipFrom ( byte key, ulong skippingQuantity ) : IEnumerable
key byte
skippingQuantity ulong
리턴 IEnumerable

IterateBackwardSkipFrom() 공개 메소드

public IterateBackwardSkipFrom ( byte key, ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
key byte
skippingQuantity ulong
readRootNode ITrieRootNode
리턴 IEnumerable

IterateBackwardSkipFrom() 공개 메소드

public IterateBackwardSkipFrom ( byte key, ulong skippingQuantity, bool useCache ) : IEnumerable
key byte
skippingQuantity ulong
useCache bool
리턴 IEnumerable

IterateBackwardStartFrom() 공개 메소드

public IterateBackwardStartFrom ( byte key, bool includeStartKey ) : IEnumerable
key byte
includeStartKey bool
리턴 IEnumerable

IterateBackwardStartFrom() 공개 메소드

public IterateBackwardStartFrom ( byte key, bool includeStartKey, ITrieRootNode readRootNode ) : IEnumerable
key byte
includeStartKey bool
readRootNode ITrieRootNode
리턴 IEnumerable

IterateBackwardStartFrom() 공개 메소드

public IterateBackwardStartFrom ( byte key, bool includeStartKey, bool useCache ) : IEnumerable
key byte
includeStartKey bool
useCache bool
리턴 IEnumerable

IterateBackwardStartsWith() 공개 메소드

public IterateBackwardStartsWith ( byte startKey ) : IEnumerable
startKey byte
리턴 IEnumerable

IterateBackwardStartsWith() 공개 메소드

public IterateBackwardStartsWith ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable
startKey byte
readRootNode ITrieRootNode
리턴 IEnumerable

IterateBackwardStartsWith() 공개 메소드

public IterateBackwardStartsWith ( byte startKey, bool useCache ) : IEnumerable
startKey byte
useCache bool
리턴 IEnumerable

IterateBackwardStartsWithClosestToPrefix() 공개 메소드

public IterateBackwardStartsWithClosestToPrefix ( byte startKey ) : IEnumerable
startKey byte
리턴 IEnumerable

IterateBackwardStartsWithClosestToPrefix() 공개 메소드

public IterateBackwardStartsWithClosestToPrefix ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable
startKey byte
readRootNode ITrieRootNode
리턴 IEnumerable

IterateBackwardStartsWithClosestToPrefix() 공개 메소드

public IterateBackwardStartsWithClosestToPrefix ( byte startKey, bool useCache ) : IEnumerable
startKey byte
useCache bool
리턴 IEnumerable

IterateForward() 공개 메소드

public IterateForward ( ) : IEnumerable
리턴 IEnumerable

IterateForward() 공개 메소드

public IterateForward ( ITrieRootNode readRootNode ) : IEnumerable
readRootNode ITrieRootNode
리턴 IEnumerable

IterateForward() 공개 메소드

public IterateForward ( bool useCache ) : IEnumerable
useCache bool
리턴 IEnumerable

IterateForwardForMinimal() 공개 메소드

public IterateForwardForMinimal ( ) : LTrieRow
리턴 LTrieRow

IterateForwardForMinimal() 공개 메소드

public IterateForwardForMinimal ( ITrieRootNode readRootNode ) : LTrieRow
readRootNode ITrieRootNode
리턴 LTrieRow

IterateForwardForMinimal() 공개 메소드

public IterateForwardForMinimal ( bool useCache ) : LTrieRow
useCache bool
리턴 LTrieRow

IterateForwardFromTo() 공개 메소드

public IterateForwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey ) : IEnumerable
startKey byte
stopKey byte
includeStartKey bool
includeStopKey bool
리턴 IEnumerable

IterateForwardFromTo() 공개 메소드

public IterateForwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, ITrieRootNode readRootNode ) : IEnumerable
startKey byte
stopKey byte
includeStartKey bool
includeStopKey bool
readRootNode ITrieRootNode
리턴 IEnumerable

IterateForwardFromTo() 공개 메소드

public IterateForwardFromTo ( byte startKey, byte stopKey, bool includeStartKey, bool includeStopKey, bool useCache ) : IEnumerable
startKey byte
stopKey byte
includeStartKey bool
includeStopKey bool
useCache bool
리턴 IEnumerable

IterateForwardSkip() 공개 메소드

public IterateForwardSkip ( ulong skippingQuantity ) : IEnumerable
skippingQuantity ulong
리턴 IEnumerable

IterateForwardSkip() 공개 메소드

public IterateForwardSkip ( ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
skippingQuantity ulong
readRootNode ITrieRootNode
리턴 IEnumerable

IterateForwardSkip() 공개 메소드

public IterateForwardSkip ( ulong skippingQuantity, bool useCache ) : IEnumerable
skippingQuantity ulong
useCache bool
리턴 IEnumerable

IterateForwardSkipFrom() 공개 메소드

public IterateForwardSkipFrom ( byte key, ulong skippingQuantity ) : IEnumerable
key byte
skippingQuantity ulong
리턴 IEnumerable

IterateForwardSkipFrom() 공개 메소드

public IterateForwardSkipFrom ( byte key, ulong skippingQuantity, ITrieRootNode readRootNode ) : IEnumerable
key byte
skippingQuantity ulong
readRootNode ITrieRootNode
리턴 IEnumerable

IterateForwardSkipFrom() 공개 메소드

public IterateForwardSkipFrom ( byte key, ulong skippingQuantity, bool useCache ) : IEnumerable
key byte
skippingQuantity ulong
useCache bool
리턴 IEnumerable

IterateForwardStartFrom() 공개 메소드

public IterateForwardStartFrom ( byte key, bool includeStartKey ) : IEnumerable
key byte
includeStartKey bool
리턴 IEnumerable

IterateForwardStartFrom() 공개 메소드

public IterateForwardStartFrom ( byte key, bool includeStartKey, ITrieRootNode readRootNode ) : IEnumerable
key byte
includeStartKey bool
readRootNode ITrieRootNode
리턴 IEnumerable

IterateForwardStartFrom() 공개 메소드

public IterateForwardStartFrom ( byte key, bool includeStartKey, bool useCache ) : IEnumerable
key byte
includeStartKey bool
useCache bool
리턴 IEnumerable

IterateForwardStartsWith() 공개 메소드

Always creates new root to get committed data
public IterateForwardStartsWith ( byte startKey ) : IEnumerable
startKey byte
리턴 IEnumerable

IterateForwardStartsWith() 공개 메소드

public IterateForwardStartsWith ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable
startKey byte
readRootNode ITrieRootNode
리턴 IEnumerable

IterateForwardStartsWith() 공개 메소드

public IterateForwardStartsWith ( byte startKey, bool useCache ) : IEnumerable
startKey byte
useCache bool
리턴 IEnumerable

IterateForwardStartsWithClosestToPrefix() 공개 메소드

public IterateForwardStartsWithClosestToPrefix ( byte startKey ) : IEnumerable
startKey byte
리턴 IEnumerable

IterateForwardStartsWithClosestToPrefix() 공개 메소드

public IterateForwardStartsWithClosestToPrefix ( byte startKey, ITrieRootNode readRootNode ) : IEnumerable
startKey byte
readRootNode ITrieRootNode
리턴 IEnumerable

IterateForwardStartsWithClosestToPrefix() 공개 메소드

public IterateForwardStartsWithClosestToPrefix ( byte startKey, bool useCache ) : IEnumerable
startKey byte
useCache bool
리턴 IEnumerable

LTrie() 공개 메소드

Liana Trie
public LTrie ( IStorage storage ) : System
storage IStorage
리턴 System

ModificationThreadId() 공개 메소드

public ModificationThreadId ( int transactionThreadId ) : void
transactionThreadId int
리턴 void

Remove() 공개 메소드

public Remove ( byte &key ) : void
key byte
리턴 void

Remove() 공개 메소드

Removes the key
public Remove ( byte &key, bool &WasRemoved, bool retrieveDeletedValue, byte &deletedValue ) : void
key byte
WasRemoved bool indicates that value existed if true
retrieveDeletedValue bool indicates if we should bind deleted value to the result
deletedValue byte interesting only if WasRemoved = true and retrieveDeletedValue is true
리턴 void

RemoveAll() 공개 메소드

public RemoveAll ( bool withFileRecreation ) : void
withFileRecreation bool
리턴 void

RollBack() 공개 메소드

RollBack
public RollBack ( ) : void
리턴 void

SelectDataBlock() 공개 메소드

public SelectDataBlock ( byte &initialPtr, bool useCache ) : byte[]
initialPtr byte
useCache bool
리턴 byte[]

SingleCommit() 공개 메소드

Wrapper for ITransactable
public SingleCommit ( ) : void
리턴 void

SingleRollback() 공개 메소드

Wrapper for ITransactable
public SingleRollback ( ) : void
리턴 void

TransactionIsFinished() 공개 메소드

public TransactionIsFinished ( int transactionThreadId ) : void
transactionThreadId int
리턴 void

프로퍼티 상세

ValuesLazyLoadingIsOn 공개적으로 프로퍼티

When it's on iterators, Select and SelectDirect return Row with the key and a pointer to the value. Value will be read out when we call it Row.Value. When it's off we read value together with the key in one round
public bool ValuesLazyLoadingIsOn
리턴 bool