Class CopyOnWriteStateTable<K,N,S>
- java.lang.Object
-
- org.apache.flink.runtime.state.heap.StateTable<K,N,S>
-
- org.apache.flink.runtime.state.heap.CopyOnWriteStateTable<K,N,S>
-
- Type Parameters:
K
- type of key.N
- type of namespace.S
- type of state.
- All Implemented Interfaces:
Iterable<StateEntry<K,N,S>>
,StateSnapshotRestore
public class CopyOnWriteStateTable<K,N,S> extends StateTable<K,N,S>
This implementation ofStateTable
usesCopyOnWriteStateMap
. This implementation supports asynchronous snapshots.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.state.heap.StateTable
keyContext, keyGroupedStateMaps, keyGroupRange, keySerializer, metaInfo
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CopyOnWriteStateMap<K,N,S>
createStateMap()
void
setMetaInfo(RegisteredKeyValueStateBackendMetaInfo<N,S> metaInfo)
CopyOnWriteStateTableSnapshot<K,N,S>
stateSnapshot()
Creates a snapshot of thisCopyOnWriteStateTable
, to be written in checkpointing.-
Methods inherited from class org.apache.flink.runtime.state.heap.StateTable
containsKey, get, get, getKeyGroupOffset, getKeys, getKeysAndNamespaces, getKeySerializer, getMapForKeyGroup, getMetaInfo, getNamespaceSerializer, getState, getStateIncrementalVisitor, getStateSerializer, isEmpty, iterator, keyGroupReader, put, put, remove, removeAndGetOld, size, sizeOfNamespace, transform
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
createStateMap
protected CopyOnWriteStateMap<K,N,S> createStateMap()
- Specified by:
createStateMap
in classStateTable<K,N,S>
-
setMetaInfo
public void setMetaInfo(RegisteredKeyValueStateBackendMetaInfo<N,S> metaInfo)
- Overrides:
setMetaInfo
in classStateTable<K,N,S>
-
stateSnapshot
@Nonnull public CopyOnWriteStateTableSnapshot<K,N,S> stateSnapshot()
Creates a snapshot of thisCopyOnWriteStateTable
, to be written in checkpointing.- Specified by:
stateSnapshot
in interfaceStateSnapshotRestore
- Specified by:
stateSnapshot
in classStateTable<K,N,S>
- Returns:
- a snapshot from this
CopyOnWriteStateTable
, for checkpointing.
-
-