public class SlidingWindowDefinition extends WindowDefinition
| Modifier and Type | Method and Description |
|---|---|
SlidingWindowDefinition |
setEarlyResultsPeriod(long earlyResultPeriodMs)
Sets the period in milliseconds at which the windowed aggregation
stage will emit partial results of all the windows that contain some
data, but the watermark hasn't yet advanced enough to close them and
emit the final results.
|
long |
slideBy()
Returns the size of the sliding step.
|
long |
windowSize()
Returns the length of the window (the size of the timestamp range it
covers).
|
earlyResultsPeriod, session, sliding, tumblingpublic SlidingWindowDefinition setEarlyResultsPeriod(long earlyResultPeriodMs)
WindowDefinitionConsider this example: we're collecting a 1-minute tumbling window of stock exchange data. The results we're getting pertain to the minute that just elapsed, but we'd also like to detect any sudden changes within the running minute. We can set the early results period to 1000 ms and get an update every second for the window that's currently being filled with data.
Note that, for a sliding window, there will be many incomplete windows
that contain some data and you'll get the early results for all of them.
Similarly, if you configure a high-enough maxLag for the event
timestamps, there can be more than one tumbling/session window with
early results.
The default value is zero, which means "don't emit early results".
setEarlyResultsPeriod in class WindowDefinitionearlyResultPeriodMs - the period in milliseconds from one start of
the emission of early results to the next onethispublic long windowSize()
slideBy().public long slideBy()
Copyright © 2022 Hazelcast, Inc.. All rights reserved.