Class TimerHeapInternalTimer<K,​N>

  • Type Parameters:
    K - Type of the keys to which timers are scoped.
    N - Type of the namespace to which timers are scoped.
    All Implemented Interfaces:
    org.apache.flink.runtime.state.heap.HeapPriorityQueueElement, org.apache.flink.runtime.state.Keyed<K>, org.apache.flink.runtime.state.PriorityComparable<InternalTimer<?,​?>>, InternalTimer<K,​N>

    @Internal
    public final class TimerHeapInternalTimer<K,​N>
    extends Object
    implements InternalTimer<K,​N>, org.apache.flink.runtime.state.heap.HeapPriorityQueueElement
    Implementation of InternalTimer to use with a HeapPriorityQueueSet.
    • Constructor Detail

      • TimerHeapInternalTimer

        public TimerHeapInternalTimer​(long timestamp,
                                      @Nonnull
                                      K key,
                                      @Nonnull
                                      N namespace)
    • Method Detail

      • getTimestamp

        public long getTimestamp()
        Description copied from interface: InternalTimer
        Returns the timestamp of the timer. This value determines the point in time when the timer will fire.
        Specified by:
        getTimestamp in interface InternalTimer<K,​N>
      • getKey

        @Nonnull
        public K getKey()
        Description copied from interface: InternalTimer
        Returns the key that is bound to this timer.
        Specified by:
        getKey in interface InternalTimer<K,​N>
        Specified by:
        getKey in interface org.apache.flink.runtime.state.Keyed<K>
      • getInternalIndex

        public int getInternalIndex()
        Specified by:
        getInternalIndex in interface org.apache.flink.runtime.state.heap.HeapPriorityQueueElement
      • setInternalIndex

        public void setInternalIndex​(int newIndex)
        Specified by:
        setInternalIndex in interface org.apache.flink.runtime.state.heap.HeapPriorityQueueElement
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • comparePriorityTo

        public int comparePriorityTo​(@Nonnull
                                     InternalTimer<?,​?> other)
        Specified by:
        comparePriorityTo in interface org.apache.flink.runtime.state.PriorityComparable<K>