Ice 3.9
C++ API Reference
Loading...
Searching...
No Matches

◆ onSamples()

template<typename Key, typename Value, typename UpdateTag>
void DataStorm::Reader< Key, Value, UpdateTag >::onSamples ( std::function< void(std::vector< Sample< Key, Value, UpdateTag > >)> init,
std::function< void(Sample< Key, Value, UpdateTag >)> queue )
noexcept

Calls the given function to provide the initial set of unread samples and when new samples are queued.

If a function is already set, it will be replaced. The init callback is called after this method returns to provide the initial set of unread samples; it is only called when the reader has unread samples. The queue callback is called when a new sample is received.

Parameters
initThe function to call with the initial set of unread samples.
queueThe function to call when a new sample is received.

Definition at line 1096 of file DataStorm.h.