Class RecordQueue
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.RecordQueue
-
public class RecordQueue extends java.lang.Object
RecordQueue is a FIFO queue ofStampedRecord
(ConsumerRecord + timestamp). It also keeps track of the partition timestamp defined as the minimum timestamp of records in its queue; in addition, its partition timestamp is monotonically increasing such that once it is advanced, it will not be decremented.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the fifo queue of its elements, also clear the time tracker's kept stamped elementsboolean
isEmpty()
Tests if the queue is emptyorg.apache.kafka.common.TopicPartition
partition()
Returns the partition with which this queue is associatedStampedRecord
poll()
Get the nextStampedRecord
from the queueint
size()
Returns the number of records in the queueSourceNode
source()
Returns the corresponding source node in the topologylong
timestamp()
Returns the tracked partition timestamp
-
-
-
Method Detail
-
source
public SourceNode source()
Returns the corresponding source node in the topology- Returns:
- SourceNode
-
partition
public org.apache.kafka.common.TopicPartition partition()
Returns the partition with which this queue is associated- Returns:
- TopicPartition
-
poll
public StampedRecord poll()
Get the nextStampedRecord
from the queue- Returns:
- StampedRecord
-
size
public int size()
Returns the number of records in the queue- Returns:
- the number of records
-
isEmpty
public boolean isEmpty()
Tests if the queue is empty- Returns:
- true if the queue is empty, otherwise false
-
timestamp
public long timestamp()
Returns the tracked partition timestamp- Returns:
- timestamp
-
clear
public void clear()
Clear the fifo queue of its elements, also clear the time tracker's kept stamped elements
-
-