Class KeyedProcessFunctionWithCleanupState<K,IN,OUT>
java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,IN,OUT>
org.apache.flink.table.runtime.functions.KeyedProcessFunctionWithCleanupState<K,IN,OUT>
- Type Parameters:
K- Type of the key.IN- Type of the input elements.OUT- Type of the output elements.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,CleanupState
- Direct Known Subclasses:
AbstractRowTimeUnboundedPrecedingOver,ProcTimeRowsBoundedPrecedingFunction,RowTimeRowsBoundedPrecedingFunction
public abstract class KeyedProcessFunctionWithCleanupState<K,IN,OUT>
extends org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,IN,OUT>
implements CleanupState
A function that processes elements of a stream, and could cleanup state.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction
org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKeyedProcessFunctionWithCleanupState(long minRetentionTime, long maxRetentionTime) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanupState(org.apache.flink.api.common.state.State... states) protected voidinitCleanupTimeState(String stateName) protected booleanisProcessingTimeTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction<K, IN, OUT>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx) protected BooleanneedToCleanupState(Long timestamp) protected voidregisterProcessingCleanupTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction<K, IN, OUT>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, long currentTime) Methods inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction
onTimer, processElementMethods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.table.runtime.functions.CleanupState
registerProcessingCleanupTimer
-
Field Details
-
stateCleaningEnabled
protected final boolean stateCleaningEnabled
-
-
Constructor Details
-
KeyedProcessFunctionWithCleanupState
public KeyedProcessFunctionWithCleanupState(long minRetentionTime, long maxRetentionTime)
-
-
Method Details
-
initCleanupTimeState
-
registerProcessingCleanupTimer
protected void registerProcessingCleanupTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction<K, IN, throws ExceptionOUT>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, long currentTime) - Throws:
Exception
-
isProcessingTimeTimer
-
cleanupState
protected void cleanupState(org.apache.flink.api.common.state.State... states) -
needToCleanupState
- Throws:
IOException
-