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 allChangelogState
s.
-
-
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, KeyGroupedInternalPriorityQueue<T> internalPriorityQueue, StateChangeLogger<T,Void> logger, TypeSerializer<T> serializer)
<K,N,V,S extends State>
ChangelogStatecreate(StateDescriptor<S,V> stateDescriptor, InternalKvState<K,N,V> internalKvState, KvStateChangeLogger<V,N> kvStateChangeLogger, InternalKeyContext<K> keyContext)
void
dispose()
ChangelogState
getExistingState(String name, StateMetaInfoSnapshot.BackendStateType type)
void
resetAllWritingMetaFlags()
-
-
-
Method Detail
-
create
public <K,N,V,S extends State> ChangelogState create(StateDescriptor<S,V> stateDescriptor, InternalKvState<K,N,V> internalKvState, KvStateChangeLogger<V,N> kvStateChangeLogger, InternalKeyContext<K> keyContext) throws Exception
- Throws:
Exception
-
create
public <T> ChangelogKeyGroupedPriorityQueue<T> create(String stateName, KeyGroupedInternalPriorityQueue<T> internalPriorityQueue, StateChangeLogger<T,Void> logger, TypeSerializer<T> serializer)
-
getExistingState
public ChangelogState getExistingState(String name, 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()
-
-