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

  • 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)  
    • Constructor Detail

      • 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 Detail

      • 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>