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 theTwoInputWindowContext.
-
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<IN1>getAllRecords1()Iterable<IN2>getAllRecords2()longgetEndTime()longgetStartTime()<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)voidputRecord1(IN1 record)voidputRecord2(IN2 record)voidsetWindow(W window)
-
-
-
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:
getStartTimein interfaceorg.apache.flink.datastream.api.extension.window.context.WindowContext
-
getEndTime
public long getEndTime()
- Specified by:
getEndTimein interfaceorg.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:
getWindowStatein interfaceorg.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:
getWindowStatein interfaceorg.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:
getWindowStatein interfaceorg.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:
getWindowStatein interfaceorg.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:
getWindowStatein interfaceorg.apache.flink.datastream.api.extension.window.context.WindowContext- Throws:
Exception
-
putRecord1
public void putRecord1(IN1 record)
-
putRecord2
public void putRecord2(IN2 record)
-
-