public class ConsumerRecords<V> extends Object implements Iterable<ConsumerRecord<V>>
| Modifier and Type | Field and Description |
|---|---|
static ConsumerRecords<?> |
EMPTY |
| Constructor and Description |
|---|
ConsumerRecords() |
ConsumerRecords(Map<TopicPartition,List<ConsumerRecord<V>>> records) |
| Modifier and Type | Method and Description |
|---|---|
int |
count()
The number of records for all topics
|
static <T> ConsumerRecords<T> |
emptyRecord() |
List<ConsumerRecord<V>> |
get(TopicPartition partition) |
boolean |
isEmpty() |
Iterator<ConsumerRecord<V>> |
iterator() |
Set<TopicPartition> |
partitions()
Get the partitions which have records contained in this record set.
|
void |
put(TopicPartition tp,
ConsumerRecord<V> r) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final ConsumerRecords<?> EMPTY
public ConsumerRecords(Map<TopicPartition,List<ConsumerRecord<V>>> records)
public ConsumerRecords()
public Set<TopicPartition> partitions()
public int count()
public void put(TopicPartition tp, ConsumerRecord<V> r)
public List<ConsumerRecord<V>> get(TopicPartition partition)
public Iterator<ConsumerRecord<V>> iterator()
iterator in interface Iterable<ConsumerRecord<V>>public boolean isEmpty()
public static <T> ConsumerRecords<T> emptyRecord()
Copyright © 2025. All rights reserved.