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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
stateCleaningEnabled
-
Constructor Summary
Constructors Constructor Description KeyedProcessFunctionWithCleanupState(long minRetentionTime, long maxRetentionTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cleanupState(org.apache.flink.api.common.state.State... states)
protected void
initCleanupTimeState(String stateName)
protected boolean
isProcessingTimeTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx)
protected Boolean
needToCleanupState(Long timestamp)
protected void
registerProcessingCleanupTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, long currentTime)
-
Methods inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction
onTimer, processElement
-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.runtime.functions.CleanupState
registerProcessingCleanupTimer
-
-
-
-
Method Detail
-
initCleanupTimeState
protected void initCleanupTimeState(String stateName)
-
registerProcessingCleanupTimer
protected void registerProcessingCleanupTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, long currentTime) throws Exception
- Throws:
Exception
-
isProcessingTimeTimer
protected boolean isProcessingTimeTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx)
-
cleanupState
protected void cleanupState(org.apache.flink.api.common.state.State... states)
-
needToCleanupState
protected Boolean needToCleanupState(Long timestamp) throws IOException
- Throws:
IOException
-
-