Package org.apache.flink.state.changelog
Class ChangelogStateFactory
- java.lang.Object
-
- org.apache.flink.state.changelog.ChangelogStateFactory
-
public class ChangelogStateFactory extends Object
Maintains the lifecycle of allChangelogStates.
-
-
Constructor Summary
Constructors Constructor Description ChangelogStateFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> ChangelogKeyGroupedPriorityQueue<T>create(String stateName, org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> internalPriorityQueue, StateChangeLogger<T,Void> logger, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)<K,N,V,S extends org.apache.flink.api.common.state.State>
ChangelogStatecreate(org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor, org.apache.flink.runtime.state.internal.InternalKvState<K,N,V> internalKvState, KvStateChangeLogger<V,N> kvStateChangeLogger, org.apache.flink.runtime.state.InternalKeyContext<K> keyContext)voiddispose()ChangelogStategetExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type)voidresetAllWritingMetaFlags()
-
-
-
Method Detail
-
create
public <K,N,V,S extends org.apache.flink.api.common.state.State> ChangelogState create(org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor, org.apache.flink.runtime.state.internal.InternalKvState<K,N,V> internalKvState, KvStateChangeLogger<V,N> kvStateChangeLogger, org.apache.flink.runtime.state.InternalKeyContext<K> keyContext) throws Exception
- Throws:
Exception
-
create
public <T> ChangelogKeyGroupedPriorityQueue<T> create(String stateName, org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> internalPriorityQueue, StateChangeLogger<T,Void> logger, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
-
getExistingState
public ChangelogState getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type) throws UnsupportedOperationException
- Parameters:
name- state nametype- state type (the only supported type currently are:key value,priority queue)- Returns:
- an existing state, i.e. the one that was already created. The returned state will not apply TTL to the passed values, regardless of the TTL settings. This prevents double applying of TTL (recovered values are TTL values if TTL was enabled). The state will, however, use TTL serializer if TTL is enabled. WARN: only valid during the recovery.
- Throws:
UnsupportedOperationException- if state type is not supported
-
resetAllWritingMetaFlags
public void resetAllWritingMetaFlags()
-
dispose
public void dispose()
-
-