Class BlockingObserverPollStrategy

  • All Implemented Interfaces:
    PollStrategy

    public class BlockingObserverPollStrategy
    extends AbstractPollStrategy
    This PollStrategy delegates polling to another implementation, and also executes an arbitrary function during each poll. This function is only allowed to observe, not to tamper with the data being polled. The function is executed synchronously, thus making it easy to reason about the state of the consumption stream at the time of the function's execution.