Class SessionWindow
- java.lang.Object
-
- org.apache.kafka.streams.kstream.Window
-
- org.apache.kafka.streams.kstream.internals.SessionWindow
-
public final class SessionWindow extends Window
A session window covers a closed time interval with its start and end timestamp both being an inclusive boundary.For time semantics, see
TimestampExtractor
.- See Also:
TimeWindow
,UnlimitedWindow
,SessionWindows
,TimestampExtractor
-
-
Constructor Summary
Constructors Constructor Description SessionWindow(long startMs, long endMs)
Create a new window for the given start time and end time (both inclusive).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
overlap(Window other)
Check if the given window overlaps with this window.
-
-
-
Constructor Detail
-
SessionWindow
public SessionWindow(long startMs, long endMs) throws java.lang.IllegalArgumentException
Create a new window for the given start time and end time (both inclusive).- Parameters:
startMs
- the start timestamp of the windowendMs
- the end timestamp of the window- Throws:
java.lang.IllegalArgumentException
- ifstartMs
is negative or ifendMs
is smaller thanstartMs
-
-
Method Detail
-
overlap
public boolean overlap(Window other) throws java.lang.IllegalArgumentException
Check if the given window overlaps with this window.
-
-