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
    Modifier and Type
    Field
    Description
    protected final boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyedProcessFunctionWithCleanupState(long minRetentionTime, long maxRetentionTime)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    cleanupState(org.apache.flink.api.common.state.State... states)
     
    protected void
     
    protected boolean
    isProcessingTimeTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,IN,OUT>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx)
     
    protected Boolean
     
    protected void
    registerProcessingCleanupTimer(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, 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
  • Field Details

    • stateCleaningEnabled

      protected final boolean stateCleaningEnabled
  • Constructor Details

    • KeyedProcessFunctionWithCleanupState

      public KeyedProcessFunctionWithCleanupState(long minRetentionTime, long maxRetentionTime)
  • Method Details

    • initCleanupTimeState

      protected void initCleanupTimeState(String stateName)
    • registerProcessingCleanupTimer

      protected void registerProcessingCleanupTimer(org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,IN,OUT>.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<K,IN,OUT>.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