SessionWindow

SessionWindow is a concrete Window with a custom overlap.

SessionWindow is created when:

  • KStreamSessionWindowAggregate is requested to mergeSessionWindow

  • KStreamSessionWindowAggregateProcessor is requested to process a single record

  • SessionKeySchema is requested to upperRangeFixedSize and lowerRangeFixedSize

Creating SessionWindow Instance

SessionWindow takes the following when created:

  • The start timestamp of the window (in milliseconds)

  • The end timestamp of the window (in milliseconds)

Checking If Two Windows Overlap — overlap Method

boolean overlap(final Window other) throws IllegalArgumentException
Note
overlap is part of Window Contract to check whether a window overlaps with another.

overlap compares the start and end timestampes and is positive (true) when end timestamp of either window is exactly or greater than the start timestamp of the other window.

overlap throws a IllegalArgumentException when the other window is not a SessionWindow.

Cannot compare windows of different type. Other window has type [className].

results matching ""

    No results matching ""