public interface WindowDefinition
WindowDefinition.WindowKind
enumerates the kinds of window that Jet supports.
To obtain a window definition, use the factory methods provided in this
interface.Modifier and Type | Interface and Description |
---|---|
static class |
WindowDefinition.WindowKind
Enumerates the kinds of window that Jet supports.
|
Modifier and Type | Method and Description |
---|---|
<W extends WindowDefinition> |
downcast()
Returns this window definition downcast to the type determined through
type inference at the call site.
|
WindowDefinition.WindowKind |
kind()
Returns what kind of window this definition describes.
|
static SessionWindowDef |
session(long sessionTimeout)
Returns a
session window definition with the
given parameters. |
static SlidingWindowDef |
sliding(long windowSize,
long slideBy)
Returns a
sliding window definition with the
given parameters. |
static SlidingWindowDef |
tumbling(long windowSize)
Returns a tumbling window definition with the given parameters.
|
long |
watermarkFrameSize()
Returns the frameLength and offset this window definition needs.
|
@Nonnull WindowDefinition.WindowKind kind()
@Nonnull <W extends WindowDefinition> W downcast()
ClassCastException
.W
- The target type of the downcastlong watermarkFrameSize()
@Nonnull static SlidingWindowDef sliding(long windowSize, long slideBy)
sliding
window definition with the
given parameters.windowSize
- the size of the window (size of the range of the timestamps it covers)slideBy
- the size of the sliding step. Window size must be multiple of this number.@Nonnull static SlidingWindowDef tumbling(long windowSize)
sliding
where the
slide is equal to window size.windowSize
- the size of the window (size of the range of the timestamps it covers)@Nonnull static SessionWindowDef session(long sessionTimeout)
session
window definition with the
given parameters.sessionTimeout
- the exclusive upper bound on the difference between any two
successive timestamps included in a window.Copyright © 2018 Hazelcast, Inc.. All rights reserved.