public class Window extends Object implements FindableProcessor, Snapshotable, MemoryCalculable
| Constructor and Description |
|---|
Window(org.wso2.siddhi.query.api.definition.WindowDefinition windowDefinition,
SiddhiAppContext siddhiAppContext)
Construct a Window object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(ComplexEventChunk complexEventChunk)
Add the given ComplexEventChunk to the Window.
|
CompiledCondition |
compileCondition(org.wso2.siddhi.query.api.expression.Expression condition,
MatchingMetaInfoHolder matchingMetaInfoHolder,
SiddhiAppContext siddhiAppContext,
List<VariableExpressionExecutor> variableExpressionExecutors,
Map<String,Table> tableMap,
String queryName)
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.
|
Map<String,Object> |
currentState()
Return an object array containing the internal state of the internalWindowProcessor.
|
StreamEvent |
find(StateEvent matchingEvent,
CompiledCondition compiledCondition)
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 Window. |
void |
init(Map<String,Table> tableMap,
Map<String,Window> eventWindowMap,
String queryName)
Initialize the WindowEvent table by creating
WindowProcessor to handle the events. |
void |
restoreState(Map<String,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 Window(org.wso2.siddhi.query.api.definition.WindowDefinition windowDefinition,
SiddhiAppContext siddhiAppContext)
windowDefinition - definition of the windowsiddhiAppContext - siddhi app context of Siddhipublic void init(Map<String,Table> tableMap, Map<String,Window> eventWindowMap, String queryName)
WindowProcessor to handle the events.tableMap - map of TableseventWindowMap - map of EventWindowsqueryName - name of the query window belongs to.public void setPublisher(StreamJunction.Publisher publisher)
publisher - output publisherpublic org.wso2.siddhi.query.api.definition.WindowDefinition getWindowDefinition()
WindowDefinition used to construct this Window.public void add(ComplexEventChunk complexEventChunk)
complexEventChunk - the event chunk to be addedpublic StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition)
find in interface FindableProcessormatchingEvent - the event to be matched with the events at the processorcompiledCondition - the execution element responsible for matching the corresponding events that matches
the matchingEvent based on pool of events at Processorpublic CompiledCondition compileCondition(org.wso2.siddhi.query.api.expression.Expression condition, MatchingMetaInfoHolder matchingMetaInfoHolder, SiddhiAppContext siddhiAppContext, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,Table> tableMap, String queryName)
compileCondition in interface FindableProcessorcondition - the matching conditionmatchingMetaInfoHolder - the meta structure of the incoming matchingEventsiddhiAppContext - current siddhi app contextvariableExpressionExecutors - the list of variable ExpressionExecutors already createdtableMap - map of event tablesqueryName - query name of findable processor belongs to.public LockWrapper getLock()
public Map<String,Object> currentState()
currentState in interface Snapshotablepublic void restoreState(Map<String,Object> state)
restoreState in interface Snapshotablestate - the stateful objects of the element as an array onpublic String getElementId()
getElementId in interface SnapshotableSnapshotable objectCopyright © 2017 WSO2. All rights reserved.