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.
public class RecordContext<K> extends ReferenceCounted<RecordContext.DisposerRunner>
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 Modifier and Type Class Description static interface
RecordContext.DisposerRunner
-
Constructor Summary
Constructors Constructor Description RecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
EpochManager.Epoch
getEpoch()
Object
getExtra()
K
getKey()
int
getKeyGroup()
<N> N
getNamespace(InternalPartitionedState<N> state)
Object
getRecord()
int
hashCode()
protected void
referenceCountReachedZero(RecordContext.DisposerRunner disposerRunner)
A method called when the reference count reaches zero.void
setExtra(Object extra)
<N> void
setNamespace(InternalPartitionedState<N> state, N namespace)
String
toString()
-
Methods inherited from class org.apache.flink.runtime.asyncprocessing.ReferenceCounted
getReferenceCount, release, release, retain, tryRetain
-
-
-
-
Constructor Detail
-
RecordContext
public RecordContext(Object record, K key, Consumer<RecordContext<K>> disposer, int keyGroup, EpochManager.Epoch epoch)
-
-
Method Detail
-
getRecord
public Object getRecord()
-
getKey
public K getKey()
-
referenceCountReachedZero
protected void referenceCountReachedZero(@Nullable RecordContext.DisposerRunner disposerRunner)
Description copied from class:ReferenceCounted
A method called when the reference count reaches zero.- Specified by:
referenceCountReachedZero
in classReferenceCounted<RecordContext.DisposerRunner>
-
getKeyGroup
public int getKeyGroup()
-
getNamespace
public <N> N getNamespace(InternalPartitionedState<N> state)
-
setNamespace
public <N> void setNamespace(InternalPartitionedState<N> state, N namespace)
-
setExtra
public void setExtra(Object extra)
-
getExtra
public Object getExtra()
-
getEpoch
public EpochManager.Epoch getEpoch()
-
-