Ice 3.9
C++ API Reference
Loading...
Searching...
No Matches
DataStorm::MultiKeyWriter< Key, Value, UpdateTag > Class Template Reference

The key writer to write data elements associated with a given set of keys. More...

#include <DataStorm/DataStorm.h>

Inheritance diagram for DataStorm::MultiKeyWriter< Key, Value, UpdateTag >:

Public Member Functions

 MultiKeyWriter (const Topic< Key, Value, UpdateTag > &topic, const std::vector< Key > &keys, std::string name=std::string(), const WriterConfig &config=WriterConfig())
 Constructs a new writer for the given keys.
 MultiKeyWriter (MultiKeyWriter &&writer) noexcept
 Move constructor.
void add (const Key &key, const Value &value)
 Adds the data element.
MultiKeyWriteroperator= (MultiKeyWriter &&writer) noexcept
 Move assignment operator.
template<typename UpdateValue>
std::function< void(const Key &, const UpdateValue &)> partialUpdate (const UpdateTag &tag)
 Gets a partial update generator function for the given partial update tag.
void remove (const Key &key) noexcept
 Removes the data element.
void update (const Key &key, const Value &value)
 Updates the data element.

Detailed Description

template<typename Key, typename Value, typename UpdateTag = std::string>
class DataStorm::MultiKeyWriter< Key, Value, UpdateTag >

The key writer to write data elements associated with a given set of keys.

A multi-key writer retains the current value of every key it has written and not since removed, so that later partial updates and late-joining readers can resolve against it. This per-key state is the writer's current data set, not retained history: it is independent of the sampleCount and sampleLifetime history settings, which bound the retained samples but never the current value of a live key. An any-key writer (one constructed with an empty key vector) that writes to an unbounded set of keys therefore accumulates one current value per key; call remove(const Key&) to retire a key and release its state once the key is no longer in use.

Definition at line 808 of file DataStorm.h.


The documentation for this class was generated from the following file: