Class TimestampPolicy.PartitionContext

  • Enclosing class:
    TimestampPolicy<K,​V>

    public abstract static class TimestampPolicy.PartitionContext
    extends java.lang.Object
    The context contains state maintained in the reader for the partition. Available with each of the methods in @TimestampPolicy.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract org.joda.time.Instant getBacklogCheckTime()
      The time at which latest offset for the partition was fetched in order to calculate backlog.
      abstract long getMessageBacklog()
      Current backlog in messages (latest offset of the partition - last processed record offset).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PartitionContext

        public PartitionContext()
    • Method Detail

      • getMessageBacklog

        public abstract long getMessageBacklog()
        Current backlog in messages (latest offset of the partition - last processed record offset).
      • getBacklogCheckTime

        public abstract org.joda.time.Instant getBacklogCheckTime()
        The time at which latest offset for the partition was fetched in order to calculate backlog. The reader periodically polls for latest offsets. This timestamp is useful in advancing watermark for idle partitions as in TimestampPolicyFactory.LogAppendTimePolicy.