com.hazelcast.jet.pipeline

## Interface WindowDefinition

- All Known Implementing Classes:
    SessionWindowDef, SlidingWindowDef

      public interface WindowDefinition

  The definition of the window for a windowed aggregation operation. The enum `WindowDefinition.WindowKind` enumerates the kinds of window that Jet supports. To obtain a window definition, use the factory methods provided in this interface.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `WindowDefinition.WindowKind` Enumerates the kinds of window that Jet supports.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `<W extends WindowDefinition> W` | `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.

- - ### Method Detail

    - #### kind

          @Nonnull
          WindowDefinition.WindowKind kind()

      Returns what kind of window this definition describes.

    - #### downcast

          @Nonnull
          <W extends WindowDefinition> W downcast()

      Returns this window definition downcast to the type determined through type inference at the call site. It will be an unchecked downcast and may fail at runtime with a `ClassCastException`.
      Type Parameters:
        `W` - The target type of the downcast
      Returns:
        this object, downcast into the inferred type

    - #### watermarkFrameSize

          long watermarkFrameSize()

      Returns the frameLength and offset this window definition needs.

    - #### sliding

          @Nonnull
          static SlidingWindowDef sliding(long windowSize,
                                                   long slideBy)

      Returns a `sliding` window definition with the given parameters.
      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.

    - #### tumbling

          @Nonnull
          static SlidingWindowDef tumbling(long windowSize)

      Returns a tumbling window definition with the given parameters. Tumbling window is a special case of `sliding` where the slide is equal to window size.
      Parameters:
        `windowSize` - the size of the window (size of the range of the timestamps it covers)

    - #### session

          @Nonnull
          static SessionWindowDef session(long sessionTimeout)

      Returns a `session` window definition with the given parameters.
      Parameters:
        `sessionTimeout` - the exclusive upper bound on the difference between any two successive timestamps included in a window.

Copyright © 2018. All rights reserved.