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 of
InternalTimer to use with a HeapPriorityQueueSet.-
Field Summary
Fields inherited from interface org.apache.flink.runtime.state.heap.HeapPriorityQueueElement
NOT_CONTAINEDFields inherited from interface org.apache.flink.streaming.api.operators.InternalTimer
KEY_EXTRACTOR_FUNCTION, TIMER_COMPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcomparePriorityTo(InternalTimer<?, ?> other) booleanintReturns the current index of this object in the internal array ofHeapPriorityQueue.getKey()Returns the key that is bound to this timer.Returns the namespace that is bound to this timer.longReturns 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.toString()
-
Constructor Details
-
TimerHeapInternalTimer
-
-
Method Details
-
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
Description copied from interface:InternalTimerReturns the key that is bound to this timer. -
getNamespace
Description copied from interface:InternalTimerReturns the namespace that is bound to this timer.- Specified by:
getNamespacein interfaceInternalTimer<K,N>
-
equals
-
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.
-
hashCode
public int hashCode() -
toString
-
comparePriorityTo
- Specified by:
comparePriorityToin interfacePriorityComparable<K>
-