Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/**
 * A fixed-size, stream-time based window specification used for aggregations.
 * <p>
 * The semantics of offset orderedbatched aggregations are: Every size() milliseconds, compute the aggregate total for the last
 * size() milliseconds. This is equivalent in semantics to TimeWindows with an advance of 0.
 * <p>
 * This class differs from TimeWindows in that the windows for a given event is computed based on the current observed
 * stream time as opposed to the timestamp of the given record. This effectively makes the windows ordered with respect
 * to the offset of the record instead of the timestamp and allows for batching together records within a window.
 */
public final class BatchedWindows extends Windows<TimeWindow> {
  
  /**
   * Returns the window size, measured in milliseconds.
   */
  public long size() { }

  /**
   * Returns 0, as offset ordered windows have no concept of "late arriving" records
   * because stream time is always monotonically increasing
   */
   public long gracePeriodMs() { return 0L; }

}

...