Kagome
Polkadot Runtime Engine in C++17
|
#include <trie_storage_backend_impl.hpp>
Public Member Functions | |
TrieStorageBackendImpl (std::shared_ptr< BufferStorage > storage, common::Buffer node_prefix) | |
~TrieStorageBackendImpl () override=default | |
std::unique_ptr< Cursor > | cursor () override |
Returns new key-value iterator. More... | |
std::unique_ptr< face::WriteBatch< BufferView, Buffer > > | batch () override |
Creates new Write Batch - an object, which can be used to efficiently write bulk data. More... | |
outcome::result< Buffer > | load (const BufferView &key) const override |
outcome::result< std::optional< Buffer > > | tryLoad (const BufferView &key) const override |
outcome::result< bool > | contains (const BufferView &key) const override |
bool | empty () const override |
Returns true if the storage is empty. More... | |
outcome::result< void > | put (const BufferView &key, const Buffer &value) override |
outcome::result< void > | put (const BufferView &key, Buffer &&value) override |
outcome::result< void > | remove (const common::BufferView &key) override |
size_t | size () const override |
Public Member Functions inherited from kagome::storage::trie::TrieStorageBackend | |
~TrieStorageBackend () override=default | |
Public Member Functions inherited from kagome::storage::face::Iterable< K, V, KView > | |
virtual | ~Iterable ()=default |
Public Member Functions inherited from kagome::storage::face::ReadableStorage< KView, V > | |
virtual | ~ReadableStorage ()=default |
virtual outcome::result< V > | load (const Key &key) const =0 |
Load value by key. More... | |
virtual outcome::result< std::optional< V > > | tryLoad (const Key &key) const =0 |
Load value by key. More... | |
Public Member Functions inherited from kagome::storage::face::ReadableBase< KView > | |
virtual | ~ReadableBase ()=default |
virtual outcome::result< bool > | contains (const Key &key) const =0 |
Checks if given key-value binding exists in the storage. More... | |
Public Member Functions inherited from kagome::storage::face::Writeable< KView, V > | |
virtual | ~Writeable ()=default |
virtual outcome::result< void > | put (const KView &key, const V &value)=0 |
Store value by key. More... | |
virtual outcome::result< void > | put (const KView &key, V &&value)=0 |
virtual outcome::result< void > | remove (const KView &key)=0 |
Remove value by key. More... | |
Public Member Functions inherited from kagome::storage::face::BatchWriteable< KView, V > | |
virtual | ~BatchWriteable ()=default |
Private Member Functions | |
common::Buffer | prefixKey (const common::BufferView &key) const |
Private Attributes | |
std::shared_ptr< BufferStorage > | storage_ |
common::Buffer | node_prefix_ |
Additional Inherited Members | |
Public Types inherited from kagome::storage::face::Iterable< K, V, KView > | |
using | Cursor = MapCursor< K, V, KView > |
Public Types inherited from kagome::storage::face::ReadableStorage< KView, V > | |
using | Key = KView |
using | Value = V |
Public Types inherited from kagome::storage::face::ReadableBase< KView > | |
using | Key = KView |
Definition at line 15 of file trie_storage_backend_impl.hpp.
kagome::storage::trie::TrieStorageBackendImpl::TrieStorageBackendImpl | ( | std::shared_ptr< BufferStorage > | storage, |
common::Buffer | node_prefix | ||
) |
Definition at line 14 of file trie_storage_backend_impl.cpp.
|
overridedefault |
|
overridevirtual |
Creates new Write Batch - an object, which can be used to efficiently write bulk data.
Implements kagome::storage::face::BatchWriteable< KView, V >.
Definition at line 27 of file trie_storage_backend_impl.cpp.
|
override |
Definition at line 42 of file trie_storage_backend_impl.cpp.
|
overridevirtual |
Returns new key-value iterator.
Implements kagome::storage::face::Iterable< K, V, KView >.
Definition at line 21 of file trie_storage_backend_impl.cpp.
|
overridevirtual |
Returns true if the storage is empty.
Implements kagome::storage::face::ReadableBase< KView >.
Definition at line 47 of file trie_storage_backend_impl.cpp.
|
override |
Definition at line 32 of file trie_storage_backend_impl.cpp.
|
private |
Definition at line 65 of file trie_storage_backend_impl.cpp.
|
override |
Definition at line 51 of file trie_storage_backend_impl.cpp.
|
override |
Definition at line 56 of file trie_storage_backend_impl.cpp.
|
override |
Definition at line 61 of file trie_storage_backend_impl.cpp.
|
overridevirtual |
Reports RAM state size
Implements kagome::storage::face::GenericStorage< K, V, KView >.
Definition at line 70 of file trie_storage_backend_impl.cpp.
|
override |
Definition at line 37 of file trie_storage_backend_impl.cpp.
|
private |
Definition at line 42 of file trie_storage_backend_impl.hpp.
|
private |
Definition at line 41 of file trie_storage_backend_impl.hpp.