Class WindowDefinition

All Implemented Interfaces:
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:
  • Constructor Details

    • WindowDefinition

      protected WindowDefinition(String id)
      Construct a WindowDefinition object using the window id.
      Parameters:
      id - the window id
  • Method Details

    • 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)
      Set the internal window to the WindowDefinition.
      Parameters:
      window - the internal window
      Returns:
      the WindowDefinition object for chained method call
    • setOutputEventType

      public void setOutputEventType(OutputStream.OutputEventType outputEventType)
      Set output event type of the window. If not explicitly assigned, OutputEventType.ALL_EVENTS will be used by default.
      Parameters:
      outputEventType - the output event type
    • getOutputEventType

      public OutputStream.OutputEventType getOutputEventType()
      Return the output event type of the window.
      Returns:
      the output event type
    • getWindow

      public Window getWindow()
      Return the internal window of the WindowDefinition.
      Returns:
      the internal window
    • toString

      public String toString()
      Overrides:
      toString in class StreamDefinition