Package io.deephaven.kafka.ingest
Class KafkaIngester.PartitionRoundRobin
java.lang.Object
io.deephaven.kafka.ingest.KafkaIngester.PartitionRoundRobin
- All Implemented Interfaces:
IntPredicate
- Enclosing class:
- KafkaIngester
A predicate for evenly distributing partitions among a set of ingesters.
-
Constructor Summary
ConstructorDescriptionPartitionRoundRobin
(int consumerIndex, int consumerCount) Creates a predicate for evenly distributing partitions among a set of ingesters. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.function.IntPredicate
and, negate, or
-
Constructor Details
-
PartitionRoundRobin
public PartitionRoundRobin(int consumerIndex, int consumerCount) Creates a predicate for evenly distributing partitions among a set of ingesters.- Parameters:
consumerIndex
- the index of this consumer; you should have precisely one ingester configured for each index between zero (inclusive) and consumerCount (exclusive)consumerCount
- the number of consumers that will ingest this topic
-
-
Method Details
-
test
public boolean test(int value) - Specified by:
test
in interfaceIntPredicate
-
toString
-