Class UnlimitedWindows

    • Field Summary

      Fields 
      Modifier and Type Field Description
      long startMs
      The start timestamp of the window.
      • Fields inherited from class org.apache.kafka.streams.kstream.Windows

        segments
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      long maintainMs()
      Return the window maintain duration (retention time) in milliseconds.
      static UnlimitedWindows of()
      Return an unlimited window starting at timestamp zero.
      long size()
      Return the size of the specified windows in milliseconds.
      UnlimitedWindows startOn​(long startMs)
      Return a new unlimited window for the specified start timestamp.
      UnlimitedWindows until​(long durationMs)
      Throws an IllegalArgumentException because the retention time for unlimited windows is always infinite and cannot be changed.
      java.util.Map<java.lang.Long,​org.apache.kafka.streams.kstream.internals.UnlimitedWindow> windowsFor​(long timestamp)
      Create all windows that contain the provided timestamp, indexed by non-negative window start timestamps.
      • Methods inherited from class org.apache.kafka.streams.kstream.Windows

        segments
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • startMs

        public final long startMs
        The start timestamp of the window.
    • Method Detail

      • of

        public static UnlimitedWindows of()
        Return an unlimited window starting at timestamp zero.
      • startOn

        public UnlimitedWindows startOn​(long startMs)
                                 throws java.lang.IllegalArgumentException
        Return a new unlimited window for the specified start timestamp.
        Parameters:
        startMs - the window start time
        Returns:
        a new unlimited window that starts at startMs
        Throws:
        java.lang.IllegalArgumentException - if the start time is negative
      • windowsFor

        public java.util.Map<java.lang.Long,​org.apache.kafka.streams.kstream.internals.UnlimitedWindow> windowsFor​(long timestamp)
        Description copied from class: Windows
        Create all windows that contain the provided timestamp, indexed by non-negative window start timestamps.
        Specified by:
        windowsFor in class Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
        Parameters:
        timestamp - the timestamp window should get created for
        Returns:
        a map of windowStartTimestamp -> Window entries
      • size

        public long size()
        Return the size of the specified windows in milliseconds. As unlimited windows have conceptually infinite size, this methods just returns Long.MAX_VALUE.
        Specified by:
        size in class Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
        Returns:
        the size of the specified windows which is Long.MAX_VALUE
      • until

        public UnlimitedWindows until​(long durationMs)
        Throws an IllegalArgumentException because the retention time for unlimited windows is always infinite and cannot be changed.
        Overrides:
        until in class Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
        Parameters:
        durationMs - the window retention time in milliseconds
        Returns:
        itself
        Throws:
        java.lang.IllegalArgumentException - on every invocation
      • maintainMs

        public long maintainMs()
        Return the window maintain duration (retention time) in milliseconds. The retention time for unlimited windows in infinite and thus represented as Long.MAX_VALUE.
        Overrides:
        maintainMs in class Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
        Returns:
        the window retention time that is Long.MAX_VALUE
      • equals

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

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