Class EpochAndRecordsMap<K,V>
java.lang.Object
io.confluent.parallelconsumer.internal.EpochAndRecordsMap<K,V>
public final class EpochAndRecordsMap<K,V> extends Object
For tagging polled records with our epoch
- See Also:
BrokerPollSystem#partitionAssignmentEpoch
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classEpochAndRecordsMap.RecordsAndEpoch -
Constructor Summary
Constructors Constructor Description EpochAndRecordsMap(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> poll, PartitionStateManager<K,V> pm) -
Method Summary
Modifier and Type Method Description intcount()The number of records for all topicsbooleanequals(Object o)Map<org.apache.kafka.common.TopicPartition,EpochAndRecordsMap.RecordsAndEpoch>getRecordMap()inthashCode()Set<org.apache.kafka.common.TopicPartition>partitions()Get the partitions which have records contained in this record set.EpochAndRecordsMap.RecordsAndEpochrecords(org.apache.kafka.common.TopicPartition partition)Get just the records for the given partitionStringtoString()
-
Constructor Details
-
EpochAndRecordsMap
public EpochAndRecordsMap(org.apache.kafka.clients.consumer.ConsumerRecords<K,V> poll, PartitionStateManager<K,V> pm)
-
-
Method Details
-
partitions
Get the partitions which have records contained in this record set.- Returns:
- the set of partitions with data in this record set (may be empty if no data was returned)
-
records
public EpochAndRecordsMap.RecordsAndEpoch records(org.apache.kafka.common.TopicPartition partition)Get just the records for the given partition- Parameters:
partition- The partition to get records for
-
count
public int count()The number of records for all topics -
getRecordMap
public Map<org.apache.kafka.common.TopicPartition,EpochAndRecordsMap.RecordsAndEpoch> getRecordMap() -
equals
-
hashCode
public int hashCode() -
toString
-