CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace cache {
28 template<
typename TKeyTraits,
typename TDescriptor,
typename TContainer,
typename TMemorySet>
30 auto size = elements.size();
34 for (
const auto& added : deltas.
Added)
37 for (
const auto& element : deltas.
Copied)
40 for (
const auto& element : deltas.
Removed)
41 elements.
remove(TKeyTraits::ToKey(element));
45 elements.setSize(
size);
49 template<
typename TDescriptor,
typename TContainer,
typename TPruningBoundary>
51 auto size = elements.size();
52 size -= elements.
prune(pruningBoundary.value());
53 elements.setSize(
size);
const TSet & Removed
Removed elements.
Definition: DeltaElements.h:47
const TSet & Added
Added elements.
Definition: DeltaElements.h:44
bool HasChanges() const
Returns true if there are any pending changes.
Definition: DeltaElements.h:38
Slim wrapper around changed elements.
Definition: DeltaElements.h:27
size_t prune(const KeyType &key)
Prunes elements with keys smaller than key. Returns number of pruned elements.
Definition: RdbTypedColumnContainer.h:130
void PruneBaseSet(RdbTypedColumnContainer< TDescriptor, TContainer > &elements, const TPruningBoundary &pruningBoundary)
Optionally prunes elements using pruningBoundary, which indicates the upper bound of elements to remo...
Definition: UpdateSet.h:50
void remove(const KeyType &key)
Removes element with key.
Definition: RdbTypedColumnContainer.h:135
uint64_t size
Definition: MemoryCounters.cpp:65
void insert(const StorageType &element)
Inserts element into container.
Definition: RdbTypedColumnContainer.h:112
const TSet & Copied
Copied elements.
Definition: DeltaElements.h:50
Definition: AddressExtractionExtension.cpp:28
void UpdateSet(RdbTypedColumnContainer< TDescriptor, TContainer > &elements, const deltaset::DeltaElements< TMemorySet > &deltas)
Applies all changes in deltas to elements.
Definition: UpdateSet.h:29
Typed container adapter that wraps column.
Definition: RdbTypedColumnContainer.h:32