Namespace Libplanet.Store.Trie
Classes
CacheableKeyValueStore
The proxy class to cache IKeyValueStore operations.
DefaultKeyValueStore
The default built-in IKeyValueStore implementation. This stores data in the file system or in memory.
DefaultStore and DefaultKeyValueStore-backed
TrieStateStore can be instantiated from a URI with default+file:
scheme
using LoadStore(Uri), e.g.:
default+file:///var/data/planet/
default+file:///c:/Users/john/AppData/Local/planet/
default+file:///var/data/planet/?secure=true
(trie keys are hashed)
The following query string parameters are supported:
journal | true (default) or false . Corresponds to
DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s journal
parameter. |
index-cache | Corresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s
indexCacheSize parameter. 50000 by default. |
block-cache | Corresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s
blockCacheSize parameter. 512 by default. |
tx-cache | Corresponds to DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s
txCacheSize parameter. 1024 by default. |
flush | true (default) or false . Corresponds to
DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s flush
parameter. |
readonly | true or false (default). Corresponds to
DefaultStore(String, Boolean, Int32, Int32, Int32, Boolean, Boolean)'s readOnly
parameter. |
states-dir | Corresponds to path
parameter. It is relative to the URI path, and defaults to states . |
secure | true or false (default). Corresponds to
TrieStateStore(IKeyValueStore, Boolean)'s secure parameter. |
InvalidTrieNodeException
MemoryKeyValueStore
Volatile in-memory key-value store.
It is useful for storing temporal small chains, e.g., fixtures for unit tests of game logic.
MemoryStore and MemoryKeyValueStore-backed
TrieStateStore can be instantiated from a URI with memory:
scheme
using LoadStore(Uri), e.g.:
memory:
memory://?secure=true
(trie keys are hashed)
MerkleTrie
An ITrie implementation implemented Merkle Patricia Trie.
MerkleTrieExtensions
An extension class to provide some convenient methods to deal with MerkleTrie.
Structs
KeyBytes
Wraps a byte array and provides equality comparison and hash code calculation. Designed to be used as a key in dictionaries.
Interfaces
IKeyValueStore
An interface to access key-value store.
ITrie
An interface for Merkle Tree.