Class 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
    • 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