@InterfaceStability.Unstable public final class SessionWindow extends Window
For time semantics, see TimestampExtractor
.
TimeWindow
,
UnlimitedWindow
,
SessionWindows
,
TimestampExtractor
Constructor and Description |
---|
SessionWindow(long startMs,
long endMs)
Create a new window for the given start time and end time (both inclusive).
|
Modifier and Type | Method and Description |
---|---|
boolean |
overlap(Window other)
Check if the given window overlaps with this window.
|
public SessionWindow(long startMs, long endMs) throws java.lang.IllegalArgumentException
startMs
- the start timestamp of the windowendMs
- the end timestamp of the windowjava.lang.IllegalArgumentException
- if startMs
is negative or if endMs
is smaller than startMs
public boolean overlap(Window other) throws java.lang.IllegalArgumentException