Package stream.nebula.operators.window
Class ThresholdWindow
- java.lang.Object
-
- stream.nebula.operators.window.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMinCount()
Access the minimal count required for a windowExpression
getPredicate()
Access the predicate of the threshold windowstatic ThresholdWindow
of(Expression predicate)
Calls the internal threshold window constructorstatic ThresholdWindow
of(Expression predicate, int minCount)
Calls the internal threshold window constructor
-
-
-
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 windowminCount
- 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
-
-