Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Following are the supported inbuilt windows of Siddhi

time

<event> time (<int|long|time>  windowTime)

  • Extension TypeWindow 
  • Description: Sliding time window, that holds events for that arrived during last windowTime period, and gets updated on every event arrival and expiry.
  • ParameterwindowTime: The sliding time period for which the window should hold events.
  • Return Type: Return current and expired events.
  • Examplestime(20) for processing events arrived in last 20 milliseconds. time(2 min) for processing events arrived in last 2 minutes. 

timeBatch

<event> timeBatch (<int|long|time>  windowTime)

  • Extension TypeWindow 
  • Description: Batch (tumbling) time window, that holds events arrived between windowTime periods, and gets updated for every windowTime.
  • ParameterwindowTime: The batch time period for which the window should hold events.
  • Return Type: Return current and expired events.
  • ExamplestimeBatch(20) for processing events arrived every 20 milliseconds. time(2 min) for processing events arrived every 2 minutes. 

length

<event> length (<int>  windowLength)

  • Extension TypeWindow 
  • Description: Sliding length window, that holds last windowLength events, and gets updated on every event arrival and expiry.
  • ParameterwindowLength The number of events that need to should be in a sliding length window.
  • Return Type: Return current and expired events.
  • Exampleslength(10) for processing last 10 events. time(200) for processing last 200 events. 

lengthBatch

<event> lengthBatch (<int>  windowLength)

  • Extension TypeWindow 
  • Description: Batch (tumbling) length window, that holds up to windowLength events, and gets updated on every windowLength event arrival.
  • ParameterwindowLength For the number of events the window should tumble.
  • Return Type: Return current and expired events.
  • ExampleslengthBatch(10) for processing 10 events as a batch. time(200) for processing 200 events as a batch. 

externalTime

<event> time (<long> timestamp<int|long|time>  windowTime)

  • Extension TypeWindow 
  • Description: Sliding time window based on external time, that holds events for that arrived during last windowTime period from the external timestamp, and gets updated on every monotonically increasing timestamp.
  • Parametertimestamp The time which the window determines as current time and will act upon, the value of this parameter should be monotonically increasing. 
  • ParameterwindowTime: The sliding time period for which the window should hold events.
  • Return Type: Return current and expired events.
  • Examples: externalTime(eventTime,20) for processing events arrived in last 20 milliseconds from the eventTime. externalTime(eventTimestamp, 2 min) for processing events arrived in last 2 minutes from eventTimestamp. 

  • No labels