Class SessionWindow

    • Constructor Detail

      • SessionWindow

        public SessionWindow​(long startMs,
                             long endMs)
                      throws IllegalArgumentException
        Create a new window for the given start time and end time (both inclusive).
        Parameters:
        startMs - the start timestamp of the window
        endMs - the end timestamp of the window
        Throws:
        IllegalArgumentException - if startMs is negative or if endMs is smaller than startMs
    • Method Detail

      • overlap

        public boolean overlap​(Window other)
                        throws IllegalArgumentException
        Check if the given window overlaps with this window.
        Specified by:
        overlap in class Window
        Parameters:
        other - another window
        Returns:
        true if other overlaps with this window—false otherwise
        Throws:
        IllegalArgumentException - if the other window has a different type than this window