All Implemented Interfaces:
Serializable, HasDisplayData

public class Sessions extends WindowFn<Object,IntervalWindow>
A WindowFn that windows values into sessions separated by periods with no input for at least the duration specified by getGapDuration().

For example, in order to window data into session with at least 10 minute gaps in between them:


 PCollection<Integer> pc = ...;
 PCollection<Integer> windowed_pc = pc.apply(
   Window.<Integer>into(Sessions.withGapDuration(Duration.standardMinutes(10))));
 
See Also: