Class ProcessingTimeSessionWindows

All Implemented Interfaces:
Serializable

@PublicEvolving public class ProcessingTimeSessionWindows extends MergingWindowAssigner<Object,TimeWindow>
A WindowAssigner that windows elements into sessions based on the current processing time. Windows cannot overlap.

For example, in order to window into windows of 1 minute, every 10 seconds:


 DataStream<Tuple2<String, Integer>> in = ...;
 KeyedStream<String, Tuple2<String, Integer>> keyed = in.keyBy(...);
 WindowedStream<Tuple2<String, Integer>, String, TimeWindows> windowed =
   keyed.window(ProcessingTimeSessionWindows.withGap(Duration.ofMinutes(1)));
 
See Also: