Class TtlStateFactory<K,N,SV,TTLSV,S extends org.apache.flink.api.common.state.State,IS extends S>
java.lang.Object
org.apache.flink.runtime.state.ttl.TtlStateFactory<K,N,SV,TTLSV,S,IS>
public class TtlStateFactory<K,N,SV,TTLSV,S extends org.apache.flink.api.common.state.State,IS extends S>
extends Object
This state factory wraps state objects, produced by backends, with TTL logic.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSerializer for user state value with TTL.static final classATypeSerializerSnapshotfor TtlSerializer. -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,N, SV, TTLSV, S extends org.apache.flink.api.common.state.State, IS extends S>
IScreateStateAndWrapWithTtlIfEnabled(org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S, SV> stateDesc, KeyedStateBackend<K> stateBackend, TtlTimeProvider timeProvider)
-
Method Details
-
createStateAndWrapWithTtlIfEnabled
public static <K,N, IS createStateAndWrapWithTtlIfEnabledSV, TTLSV, S extends org.apache.flink.api.common.state.State, IS extends S> (org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S, SV> stateDesc, KeyedStateBackend<K> stateBackend, TtlTimeProvider timeProvider) throws Exception- Throws:
Exception
-