Class TimerHeapInternalTimer<K,N>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.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:
HeapPriorityQueueElement,Keyed<K>,PriorityComparable<InternalTimer<?,?>>,InternalTimer<K,N>
@Internal public final class TimerHeapInternalTimer<K,N> extends Object implements InternalTimer<K,N>, HeapPriorityQueueElement
Implementation ofInternalTimerto use with aHeapPriorityQueueSet.
-
-
Field Summary
-
Fields inherited from interface org.apache.flink.runtime.state.heap.HeapPriorityQueueElement
NOT_CONTAINED
-
Fields inherited from interface org.apache.flink.streaming.api.operators.InternalTimer
KEY_EXTRACTOR_FUNCTION, TIMER_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description TimerHeapInternalTimer(long timestamp, K key, N namespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomparePriorityTo(InternalTimer<?,?> other)booleanequals(Object o)intgetInternalIndex()Returns the current index of this object in the internal array ofHeapPriorityQueue.KgetKey()Returns the key that is bound to this timer.NgetNamespace()Returns the namespace that is bound to this timer.longgetTimestamp()Returns the timestamp of the timer.inthashCode()voidsetInternalIndex(int newIndex)Sets the current index of this object in theHeapPriorityQueueand should only be called by the owningHeapPriorityQueue.StringtoString()
-
-
-
Method Detail
-
getTimestamp
public long getTimestamp()
Description copied from interface:InternalTimerReturns the timestamp of the timer. This value determines the point in time when the timer will fire.- Specified by:
getTimestampin interfaceInternalTimer<K,N>
-
getKey
@Nonnull public K getKey()
Description copied from interface:InternalTimerReturns the key that is bound to this timer.
-
getNamespace
@Nonnull public N getNamespace()
Description copied from interface:InternalTimerReturns the namespace that is bound to this timer.- Specified by:
getNamespacein interfaceInternalTimer<K,N>
-
getInternalIndex
public int getInternalIndex()
Description copied from interface:HeapPriorityQueueElementReturns the current index of this object in the internal array ofHeapPriorityQueue.- Specified by:
getInternalIndexin interfaceHeapPriorityQueueElement
-
setInternalIndex
public void setInternalIndex(int newIndex)
Description copied from interface:HeapPriorityQueueElementSets the current index of this object in theHeapPriorityQueueand should only be called by the owningHeapPriorityQueue.- Specified by:
setInternalIndexin interfaceHeapPriorityQueueElement- Parameters:
newIndex- the new index in the timer heap.
-
comparePriorityTo
public int comparePriorityTo(@Nonnull InternalTimer<?,?> other)- Specified by:
comparePriorityToin interfacePriorityComparable<K>
-
-