Package io.siddhi.query.api.definition
Class WindowDefinition
- java.lang.Object
-
- io.siddhi.query.api.definition.AbstractDefinition
-
- io.siddhi.query.api.definition.StreamDefinition
-
- io.siddhi.query.api.definition.WindowDefinition
-
- All Implemented Interfaces:
SiddhiElement,Serializable
public class WindowDefinition extends StreamDefinition
Java POJO representation of Siddhi Window definition. The window must be defined in the following format: 'define window([attributes]) function([parameters]) output [event type];'- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class io.siddhi.query.api.definition.AbstractDefinition
annotations, attributeList, attributeNameArray, hasDefinitionChanged, id
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWindowDefinition(String id)Construct a WindowDefinition object using the window id.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputStream.OutputEventTypegetOutputEventType()Return the output event type of the window.WindowgetWindow()Return the internal window of the WindowDefinition.static WindowDefinitionid(String id)Construct and return a WindowDefinition object using the given id.voidsetOutputEventType(OutputStream.OutputEventType outputEventType)UpdateSet output event type of the window.StringtoString()WindowDefinitionwindow(Window window)UpdateSet the internal window to the WindowDefinition.-
Methods inherited from class io.siddhi.query.api.definition.StreamDefinition
annotation, attribute, clone
-
Methods inherited from class io.siddhi.query.api.definition.AbstractDefinition
annotation, checkAttribute, equals, equalsIgnoreAnnotations, getAnnotations, getAttributeList, getAttributeNameArray, getAttributePosition, getAttributeType, getId, getQueryContextEndIndex, getQueryContextStartIndex, hashCode, setId, setQueryContextEndIndex, setQueryContextStartIndex, toString
-
-
-
-
Constructor Detail
-
WindowDefinition
protected WindowDefinition(String id)
Construct a WindowDefinition object using the window id.- Parameters:
id- the window id
-
-
Method Detail
-
id
public static WindowDefinition id(String id)
Construct and return a WindowDefinition object using the given id.- Parameters:
id- the window id- Returns:
- new instance of WindowDefinition
-
window
public WindowDefinition window(Window window)
UpdateSet the internal window to the WindowDefinition.- Parameters:
window- the internal window- Returns:
- the WindowDefinition object for chained method call
-
getOutputEventType
public OutputStream.OutputEventType getOutputEventType()
Return the output event type of the window.- Returns:
- the output event type
-
setOutputEventType
public void setOutputEventType(OutputStream.OutputEventType outputEventType)
UpdateSet output event type of the window. If not explicitly assigned, OutputEventType.ALL_EVENTS will be used by default.- Parameters:
outputEventType- the output event type
-
getWindow
public Window getWindow()
Return the internal window of the WindowDefinition.- Returns:
- the internal window
-
toString
public String toString()
- Overrides:
toStringin classAbstractDefinition
-
-