Class ProcessingTimeSessionWindows

  • All Implemented Interfaces:
    Serializable

    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(Time.minutes(1)));
     
    See Also:
    Serialized Form