Class DefaultTwoInputWindowContext<K,IN1,IN2,W extends org.apache.flink.streaming.api.windowing.windows.Window>

java.lang.Object
org.apache.flink.datastream.impl.extension.window.context.DefaultTwoInputWindowContext<K,IN1,IN2,W>
Type Parameters:
K - Type of the key.
IN1 - Type of the first input elements.
IN2 - Type of the second input elements.
W - Type of the window.
All Implemented Interfaces:
org.apache.flink.datastream.api.extension.window.context.TwoInputWindowContext<IN1,IN2>, org.apache.flink.datastream.api.extension.window.context.WindowContext

public class DefaultTwoInputWindowContext<K,IN1,IN2,W extends org.apache.flink.streaming.api.windowing.windows.Window> extends Object implements org.apache.flink.datastream.api.extension.window.context.TwoInputWindowContext<IN1,IN2>
Default implementation of the TwoInputWindowContext.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultTwoInputWindowContext(W window, org.apache.flink.api.common.state.v2.AppendingState<IN1,org.apache.flink.api.common.state.v2.StateIterator<IN1>,Iterable<IN1>> leftWindowState, org.apache.flink.api.common.state.v2.AppendingState<IN2,org.apache.flink.api.common.state.v2.StateIterator<IN2>,Iterable<IN2>> rightWindowState, org.apache.flink.datastream.api.extension.window.function.WindowProcessFunction windowProcessFunction, org.apache.flink.runtime.asyncprocessing.operators.AbstractAsyncStateStreamOperator<?> operator, org.apache.flink.api.common.typeutils.TypeSerializer<W> windowSerializer, boolean isMergingWindow)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    long
     
    long
     
    <T, ACC, OUT>
    Optional<org.apache.flink.api.common.state.v2.AggregatingState<T,OUT>>
    getWindowState(org.apache.flink.api.common.state.AggregatingStateDeclaration<T,ACC,OUT> stateDeclaration)
     
    <T> Optional<org.apache.flink.api.common.state.v2.ListState<T>>
    getWindowState(org.apache.flink.api.common.state.ListStateDeclaration<T> stateDeclaration)
     
    <KEY, V> Optional<org.apache.flink.api.common.state.v2.MapState<KEY,V>>
    getWindowState(org.apache.flink.api.common.state.MapStateDeclaration<KEY,V> stateDeclaration)
     
    <T> Optional<org.apache.flink.api.common.state.v2.ReducingState<T>>
    getWindowState(org.apache.flink.api.common.state.ReducingStateDeclaration<T> stateDeclaration)
     
    <T> Optional<org.apache.flink.api.common.state.v2.ValueState<T>>
    getWindowState(org.apache.flink.api.common.state.ValueStateDeclaration<T> stateDeclaration)
     
    void
    putRecord1(IN1 record)
     
    void
    putRecord2(IN2 record)
     
    void
    setWindow(W window)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultTwoInputWindowContext

      public DefaultTwoInputWindowContext(W window, org.apache.flink.api.common.state.v2.AppendingState<IN1,org.apache.flink.api.common.state.v2.StateIterator<IN1>,Iterable<IN1>> leftWindowState, org.apache.flink.api.common.state.v2.AppendingState<IN2,org.apache.flink.api.common.state.v2.StateIterator<IN2>,Iterable<IN2>> rightWindowState, org.apache.flink.datastream.api.extension.window.function.WindowProcessFunction windowProcessFunction, org.apache.flink.runtime.asyncprocessing.operators.AbstractAsyncStateStreamOperator<?> operator, org.apache.flink.api.common.typeutils.TypeSerializer<W> windowSerializer, boolean isMergingWindow)
  • Method Details

    • setWindow

      public void setWindow(W window)
    • getStartTime

      public long getStartTime()
      Specified by:
      getStartTime in interface org.apache.flink.datastream.api.extension.window.context.WindowContext
    • getEndTime

      public long getEndTime()
      Specified by:
      getEndTime in interface org.apache.flink.datastream.api.extension.window.context.WindowContext
    • getWindowState

      public <T> Optional<org.apache.flink.api.common.state.v2.ListState<T>> getWindowState(org.apache.flink.api.common.state.ListStateDeclaration<T> stateDeclaration) throws Exception
      Specified by:
      getWindowState in interface org.apache.flink.datastream.api.extension.window.context.WindowContext
      Throws:
      Exception
    • getWindowState

      public <KEY, V> Optional<org.apache.flink.api.common.state.v2.MapState<KEY,V>> getWindowState(org.apache.flink.api.common.state.MapStateDeclaration<KEY,V> stateDeclaration) throws Exception
      Specified by:
      getWindowState in interface org.apache.flink.datastream.api.extension.window.context.WindowContext
      Throws:
      Exception
    • getWindowState

      public <T> Optional<org.apache.flink.api.common.state.v2.ValueState<T>> getWindowState(org.apache.flink.api.common.state.ValueStateDeclaration<T> stateDeclaration) throws Exception
      Specified by:
      getWindowState in interface org.apache.flink.datastream.api.extension.window.context.WindowContext
      Throws:
      Exception
    • getWindowState

      public <T> Optional<org.apache.flink.api.common.state.v2.ReducingState<T>> getWindowState(org.apache.flink.api.common.state.ReducingStateDeclaration<T> stateDeclaration) throws Exception
      Specified by:
      getWindowState in interface org.apache.flink.datastream.api.extension.window.context.WindowContext
      Throws:
      Exception
    • getWindowState

      public <T, ACC, OUT> Optional<org.apache.flink.api.common.state.v2.AggregatingState<T,OUT>> getWindowState(org.apache.flink.api.common.state.AggregatingStateDeclaration<T,ACC,OUT> stateDeclaration) throws Exception
      Specified by:
      getWindowState in interface org.apache.flink.datastream.api.extension.window.context.WindowContext
      Throws:
      Exception
    • putRecord1

      public void putRecord1(IN1 record)
      Specified by:
      putRecord1 in interface org.apache.flink.datastream.api.extension.window.context.TwoInputWindowContext<K,IN1>
    • getAllRecords1

      public Iterable<IN1> getAllRecords1()
      Specified by:
      getAllRecords1 in interface org.apache.flink.datastream.api.extension.window.context.TwoInputWindowContext<K,IN1>
    • putRecord2

      public void putRecord2(IN2 record)
      Specified by:
      putRecord2 in interface org.apache.flink.datastream.api.extension.window.context.TwoInputWindowContext<K,IN1>
    • getAllRecords2

      public Iterable<IN2> getAllRecords2()
      Specified by:
      getAllRecords2 in interface org.apache.flink.datastream.api.extension.window.context.TwoInputWindowContext<K,IN1>