Class RecordQueue


  • public class RecordQueue
    extends java.lang.Object
    RecordQueue is a FIFO queue of StampedRecord (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 elements
      boolean isEmpty()
      Tests if the queue is empty
      org.apache.kafka.common.TopicPartition partition()
      Returns the partition with which this queue is associated
      StampedRecord poll()
      Get the next StampedRecord from the queue
      int size()
      Returns the number of records in the queue
      SourceNode source()
      Returns the corresponding source node in the topology
      long timestamp()
      Returns the tracked partition timestamp
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • 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