Class ThresholdWindow

  • All Implemented Interfaces:
    ContentBasedWindowDefinition, WindowDefinition

    public class ThresholdWindow
    extends java.lang.Object
    implements ContentBasedWindowDefinition
    A content-based window type. A window starts whenever a tuple arrives that fulfills the specified predicate. Respectively, a window is closed whenever a tuple occurs that does not satisfy the predicate. Additionally, a minCount can be defined to control the minimal window size for computation, e.g., if a minCount of 3 is set, only windows with at least 3 tuples are computed.
    • Method Detail

      • of

        public static ThresholdWindow of​(Expression predicate)
        Calls the internal threshold window constructor
        Parameters:
        predicate - to be met within the window
        Returns:
        a new threshold window
      • of

        public static ThresholdWindow of​(Expression predicate,
                                         int minCount)
        Calls the internal threshold window constructor
        Parameters:
        predicate - to be met within the window
        minCount - the minimal number of tuples to occur within one window
        Returns:
        a new threshold window
      • getPredicate

        public Expression getPredicate()
        Access the predicate of the threshold window
        Returns:
        The predicate
      • getMinCount

        public int getMinCount()
        Access the minimal count required for a window
        Returns:
        The minCount