public class EventWindow extends Object implements FindableProcessor, Snapshotable
| Constructor and Description |
|---|
EventWindow(org.wso2.siddhi.query.api.definition.WindowDefinition windowDefinition,
ExecutionPlanContext executionPlanContext)
Construct a EventWindow object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(ComplexEventChunk complexEventChunk)
Add the given ComplexEventChunk to the EventWindow.
|
Finder |
constructFinder(org.wso2.siddhi.query.api.expression.Expression expression,
MatchingMetaStateHolder matchingMetaStateHolder,
ExecutionPlanContext executionPlanContext,
List<VariableExpressionExecutor> variableExpressionExecutors,
Map<String,EventTable> eventTableMap)
To construct a finder having the capability of finding events at the processor that corresponds to the incoming
matchingEvent and the given matching expression logic.
|
Object[] |
currentState()
Return an object array containing the internal state of the internalWindowProcessor.
|
StreamEvent |
find(StateEvent matchingEvent,
Finder finder)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
String |
getElementId()
Return the elementId which may be used for snapshot creation.
|
LockWrapper |
getLock() |
org.wso2.siddhi.query.api.definition.WindowDefinition |
getWindowDefinition()
Return the
WindowDefinition used to construct this EventWindow. |
void |
init(Map<String,EventTable> eventTableMap,
Map<String,EventWindow> eventWindowMap,
LatencyTracker latencyTracker,
String queryName)
Initialize the WindowEvent table by creating
WindowProcessor to handle the events. |
void |
restoreState(Object[] state)
Restore the internalWindowProcessor using given state.
|
void |
setPublisher(StreamJunction.Publisher publisher)
Set Publisher to which the the output events from internal window have to be sent.
|
public EventWindow(org.wso2.siddhi.query.api.definition.WindowDefinition windowDefinition,
ExecutionPlanContext executionPlanContext)
windowDefinition - definition of the windowexecutionPlanContext - execution plan context of Siddhipublic void init(Map<String,EventTable> eventTableMap, Map<String,EventWindow> eventWindowMap, LatencyTracker latencyTracker, String queryName)
WindowProcessor to handle the events.eventTableMap - map of EventTableseventWindowMap - map of EventWindowslatencyTracker - to rack the latency if statistic of underlying WindowProcessor is requiredpublic void setPublisher(StreamJunction.Publisher publisher)
publisher - output publisherpublic org.wso2.siddhi.query.api.definition.WindowDefinition getWindowDefinition()
WindowDefinition used to construct this EventWindow.public void add(ComplexEventChunk complexEventChunk)
complexEventChunk - the event chunk to be addedpublic StreamEvent find(StateEvent matchingEvent, Finder finder)
find in interface FindableProcessormatchingEvent - the event to be matched with the events at the processorfinder - the execution element responsible for finding the corresponding events that matches
the matchingEvent based on pool of events at Processorpublic Finder constructFinder(org.wso2.siddhi.query.api.expression.Expression expression, MatchingMetaStateHolder matchingMetaStateHolder, ExecutionPlanContext executionPlanContext, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,EventTable> eventTableMap)
constructFinder in interface FindableProcessorexpression - the matching expressionmatchingMetaStateHolder - the meta structure of the incoming matchingEventexecutionPlanContext - current execution plan contextvariableExpressionExecutors - the list of variable ExpressionExecutors already createdeventTableMap - map of event tablespublic LockWrapper getLock()
public Object[] currentState()
currentState in interface Snapshotablepublic void restoreState(Object[] state)
restoreState in interface Snapshotablestate - the stateful objects of the element as an array onpublic String getElementId()
getElementId in interface SnapshotableSnapshotable objectCopyright © 2018 WSO2. All Rights Reserved.