Class RecordContext<K>
java.lang.Object
org.apache.flink.runtime.asyncprocessing.ReferenceCounted<RecordContext.DisposerRunner>
org.apache.flink.runtime.asyncprocessing.RecordContext<K>
- Type Parameters:
K- The type of the key inside the record.
A context that preserves the necessary variables required by each operation, all operations for
one record will share the same element context.
Reference counting mechanism, please refer to ContextStateFutureImpl.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch, int variableCount) RecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch, int variableCount, int priority) RecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch, AtomicReferenceArray<Object> variables, int priority) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetEpoch()getExtra()getKey()int<N> NgetNamespace(InternalPartitionedState<N> state) int<T> TgetVariable(int i) inthashCode()protected voidreferenceCountReachedZero(RecordContext.DisposerRunner disposerRunner) A method called when the reference count reaches zero.void<N> voidsetNamespace(InternalPartitionedState<N> state, N namespace) <T> voidsetVariable(int i, T value) toString()Methods inherited from class org.apache.flink.runtime.asyncprocessing.ReferenceCounted
getReferenceCount, release, release, retain, tryRetain
-
Constructor Details
-
RecordContext
public RecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch, int variableCount) -
RecordContext
public RecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch, int variableCount, int priority) -
RecordContext
public RecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch, AtomicReferenceArray<Object> variables, int priority)
-
-
Method Details
-
getRecord
-
getKey
-
referenceCountReachedZero
Description copied from class:ReferenceCountedA method called when the reference count reaches zero.- Specified by:
referenceCountReachedZeroin classReferenceCounted<RecordContext.DisposerRunner>
-
getKeyGroup
public int getKeyGroup() -
getNamespace
-
setNamespace
-
getVariable
public <T> T getVariable(int i) -
setVariable
public <T> void setVariable(int i, T value) -
setExtra
-
getExtra
-
getEpoch
-
getPriority
public int getPriority() -
hashCode
public int hashCode() -
equals
-
toString
-