SampleExtensions<T> extension

Extends the Stream class with the ability to sample events from the Stream

on

Methods

sample(Stream sampleStream) Stream<T>
Emits the most recently emitted item (if any) emitted by the source Stream since the previous emission from the sampleStream.
sampleTime(Duration duration) Stream<T>
Emits the most recently emitted item (if any) emitted by the source Stream since the previous emission within the recurring time span, defined by duration