Class DummySink

Inheritance Relationships

Base Type

Class Documentation

class DummySink : public DataTamer::DataSinkBase

The DummySink does nothing, only counting the number of snapshots received. Used mostly for testing and debugging.

Public Functions

inline ~DummySink() override
inline virtual void addChannel(std::string const &name, Schema const &schema) override

addChannel will register a schema into the sink. That schema will be recognized by its hash.

Parameters:
inline virtual bool storeSnapshot(const Snapshot &snapshot) override

storeSnapshot contains the code to execute when popping a snapshot from the queue.

Parameters:

snapshot – data to be pushed into the sink.

Returns:

true if processed successfully

Public Members

std::unordered_map<uint64_t, Schema> schemas
std::unordered_map<uint64_t, std::string> schema_names
std::unordered_map<uint64_t, long> snapshots_count
Snapshot latest_snapshot
Mutex schema_mutex_