Ice 3.8
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 always called after this method returns to provide the initial set of 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 1058 of file DataStorm.h.