Class BlockingObserverPollStrategy
java.lang.Object
com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
com.linkedin.venice.unit.kafka.consumer.poll.BlockingObserverPollStrategy
- All Implemented Interfaces:
PollStrategy
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.-
Field Summary
Fields inherited from class com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
keepPollingWhenEmpty
-
Constructor Summary
ConstructorDescriptionBlockingObserverPollStrategy
(AbstractPollStrategy basePollStrategy, Consumer<PubSubTopicPartitionOffset> observer) -
Method Summary
Modifier and TypeMethodDescriptionprotected PubSubTopicPartitionOffset
getNextPoll
(Map<PubSubTopicPartition, Long> offsets) Methods inherited from class com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
incrementOffset, poll
-
Constructor Details
-
BlockingObserverPollStrategy
public BlockingObserverPollStrategy(AbstractPollStrategy basePollStrategy, Consumer<PubSubTopicPartitionOffset> observer)
-
-
Method Details
-
getNextPoll
- Specified by:
getNextPoll
in classAbstractPollStrategy
-