Class WindowResult<R>

  • Type Parameters:
    R - type of aggregated result
    Direct Known Subclasses:
    KeyedWindowResult

    public class WindowResult<R>
    extends java.lang.Object
    Holds the result of an aggregate operation performed over a time window.
    Since:
    Jet 3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowResult​(long start, long end, R result)
      Constructs a window result that is not early.
      WindowResult​(long start, long end, R result, boolean isEarly)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long end()
      Returns the ending timestamp of the window.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      boolean isEarly()
      Returns whether this is an early window result, to be followed by the final one.
      R result()
      Returns the aggregated result.
      long start()
      Returns the starting timestamp of the window.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WindowResult

        public WindowResult​(long start,
                            long end,
                            @Nonnull
                            R result,
                            boolean isEarly)
        Parameters:
        start - start time of the window
        end - end time of the window
        result - result of aggregation
        isEarly - whether this is an early result, to be followed by the final one
      • WindowResult

        public WindowResult​(long start,
                            long end,
                            @Nonnull
                            R result)
        Constructs a window result that is not early.
        Parameters:
        start - start time of the window
        end - end time of the window
        result - result of aggregation
    • Method Detail

      • start

        public long start()
        Returns the starting timestamp of the window.
      • end

        public long end()
        Returns the ending timestamp of the window.
      • result

        @Nonnull
        public R result()
        Returns the aggregated result.
      • isEarly

        public boolean isEarly()
        Returns whether this is an early window result, to be followed by the final one.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object