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 largest timestamp seen on the partition so far; this is passed to the timestamp extractor.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long UNKNOWN  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clear the fifo queue of its elements
      java.lang.Long headRecordOffset()  
      long headRecordTimestamp()
      Returns the head record's timestamp
      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
      • 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
      • headRecordTimestamp

        public long headRecordTimestamp()
        Returns the head record's timestamp
        Returns:
        timestamp
      • headRecordOffset

        public java.lang.Long headRecordOffset()
      • clear

        public void clear()
        Clear the fifo queue of its elements