Class RandomPollStrategy
java.lang.Object
com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
com.linkedin.venice.unit.kafka.consumer.poll.RandomPollStrategy
- All Implemented Interfaces:
PollStrategy
A simple
PollStrategy
which delivers messages from any partition, while respecting the
ordering guarantee of individual partitions.
The resulting consumption order is non-deterministic.-
Field Summary
Fields inherited from class com.linkedin.venice.unit.kafka.consumer.poll.AbstractPollStrategy
keepPollingWhenEmpty
-
Constructor Summary
ConstructorDescriptionRandomPollStrategy
(boolean keepPollingWhenEmpty) RandomPollStrategy
(int maxMessagePerPoll) -
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
-
RandomPollStrategy
public RandomPollStrategy() -
RandomPollStrategy
public RandomPollStrategy(int maxMessagePerPoll) -
RandomPollStrategy
public RandomPollStrategy(boolean keepPollingWhenEmpty)
-
-
Method Details
-
getNextPoll
- Specified by:
getNextPoll
in classAbstractPollStrategy
-