CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
28 namespace catapult {
namespace cache {
31 template<
typename TDescriptor,
typename TContainer = RdbColumnContainer>
34 using KeyType =
typename TDescriptor::KeyType;
42 using KeyType =
typename TDescriptor::KeyType;
54 return !(*
this == rhs);
65 m_pStorage = std::make_unique<StorageType>(TDescriptor::ToStorage(value));
94 template<
typename TDatabase = RocksDatabase>
106 #if !defined(NDEBUG) && defined(_MSC_VER)
107 #pragma warning(push)
108 #pragma warning(disable:4702)
115 TDescriptor::Serializer::SerializeValue(TDescriptor::ToValue(element)));
118 #if !defined(NDEBUG) && defined(_MSC_VER)
131 return TContainer::prune(TDescriptor::Serializer::KeyToBoundary(key));
141 return const_iterator();
static RdbDataIterator End()
Iterator representing no match.
Definition: RocksDatabase.cpp:52
bool operator!=(const const_iterator &rhs) const
Returns true if this iterator and rhs are not equal.
Definition: RdbTypedColumnContainer.h:53
typename TDescriptor::KeyType KeyType
Definition: RdbTypedColumnContainer.h:42
typename TDescriptor::ValueType ValueType
Definition: RdbTypedColumnContainer.h:43
RawBuffer buffer() const
Returns storage as raw buffer.
Definition: RocksDatabase.cpp:72
bool empty() const
Returns true if container is empty.
Definition: RdbTypedColumnContainer.h:100
const_iterator cend() const
Returns iterator that represents non-existing element.
Definition: RdbTypedColumnContainer.h:140
const_iterator find(const KeyType &key) const
Finds element with key. Returns cend() if key has not been found.
Definition: RdbTypedColumnContainer.h:123
Typed container iterator that adds descriptor-based deserialization.
Definition: RdbTypedColumnContainer.h:40
typename PatriciaTreeColumnDescriptor ::StorageType StorageType
Definition: RdbTypedColumnContainer.h:36
size_t prune(const KeyType &key)
Prunes elements with keys smaller than key. Returns number of pruned elements.
Definition: RdbTypedColumnContainer.h:130
Iterator adapter, allowing existence check on keys and data retrieval.
Definition: RocksDatabase.h:40
const StorageType & operator*() const
Returns reference to current element.
Definition: RdbTypedColumnContainer.h:59
const RdbDataIterator & dbIterator() const
Returns const reference to underlying db iterator.
Definition: RdbTypedColumnContainer.h:78
RdbTypedColumnContainer(TDatabase &database, size_t columnId)
Creates a container around database and columnId.
Definition: RdbTypedColumnContainer.h:95
void remove(const KeyType &key)
Removes element with key.
Definition: RdbTypedColumnContainer.h:135
uint64_t size
Definition: MemoryCounters.cpp:65
typename PatriciaTreeColumnDescriptor ::ValueType ValueType
Definition: RdbTypedColumnContainer.h:35
void insert(const StorageType &element)
Inserts element into container.
Definition: RdbTypedColumnContainer.h:112
RdbDataIterator & dbIterator()
Returns reference to underlying db iterator.
Definition: RdbTypedColumnContainer.h:83
bool operator==(const const_iterator &rhs) const
Returns true if this iterator and rhs are equal.
Definition: RdbTypedColumnContainer.h:48
RdbDataIterator m_iterator
Definition: RdbTypedColumnContainer.h:88
RawBuffer SerializeKey(const TValue &value)
Serializes value-based key (value).
Definition: KeySerializers.h:31
#define CATAPULT_THROW_INVALID_ARGUMENT(MESSAGE)
Macro used to throw a catapult invalid argument.
Definition: exceptions.h:179
Definition: AddressExtractionExtension.cpp:28
typename PatriciaTreeColumnDescriptor ::KeyType KeyType
Definition: RdbTypedColumnContainer.h:34
std::shared_ptr< StorageType > m_pStorage
Definition: RdbTypedColumnContainer.h:89
const StorageType * operator->() const
Returns pointer to current element.
Definition: RdbTypedColumnContainer.h:72
Typed container adapter that wraps column.
Definition: RdbTypedColumnContainer.h:32
typename TDescriptor::StorageType StorageType
Definition: RdbTypedColumnContainer.h:44