public class SessionWindowProcessor extends GroupingFindableWindowProcessor<io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState> implements SchedulingProcessor
WindowProcessor which represent a Window operating based on a session.| Modifier and Type | Class and Description |
|---|---|
static class |
SessionWindowProcessor.SessionComplexEventChunk<E extends ComplexEvent>
Collection used to manage session windows.
|
GroupingWindowProcessor.GroupingKeyPopulatorgroupingKeyPopulator, internalAttributesattributeExpressionExecutors, attributeExpressionLength, complexEventPopulater, inputDefinition, metaStreamEvent, nextProcessor, siddhiQueryContext, stateHolder, streamEventClonerHolder| Constructor and Description |
|---|
SessionWindowProcessor() |
| Modifier and Type | Method and Description |
|---|---|
CompiledCondition |
compileCondition(io.siddhi.query.api.expression.Expression condition,
MatchingMetaInfoHolder matchingMetaInfoHolder,
List<VariableExpressionExecutor> variableExpressionExecutors,
Map<String,Table> tableMap,
io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState state,
SiddhiQueryContext siddhiQueryContext)
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.
|
StreamEvent |
find(StateEvent matchingEvent,
CompiledCondition compiledCondition,
StreamEventCloner streamEventCloner,
io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState state)
To find events from the processor event pool, that the matches the matchingEvent based on finder logic.
|
Scheduler |
getScheduler() |
protected StateFactory<io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState> |
init(ExpressionExecutor[] attributeExpressionExecutors,
ConfigReader configReader,
boolean outputExpectsExpiredEvents,
SiddhiQueryContext siddhiQueryContext)
The init method of the WindowProcessor, this method will be called before other methods
|
protected void |
processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk,
Processor nextProcessor,
StreamEventCloner streamEventCloner,
GroupingWindowProcessor.GroupingKeyPopulator groupingKeyPopulater,
io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState state)
The main processing method that will be called upon event arrival
|
void |
setScheduler(Scheduler scheduler) |
void |
start()
This will be called only once and this can be used to acquire
required resources for the processing element.
|
void |
stop()
This will be called only once and this can be used to release
the acquired resources for processing.
|
compileCondition, findconstructStreamEventPopulater, getProcessingMode, init, processEventChunkgetReturnAttributesgetNextProcessor, initProcessor, process, setNextProcessor, setStreamEventCloner, setToLastclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNextProcessor, process, setNextProcessor, setToLastpublic Scheduler getScheduler()
getScheduler in interface SchedulingProcessorpublic void setScheduler(Scheduler scheduler)
setScheduler in interface SchedulingProcessorprotected StateFactory<io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState> init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, boolean outputExpectsExpiredEvents, SiddhiQueryContext siddhiQueryContext)
GroupingWindowProcessorinit in class GroupingWindowProcessor<io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState>attributeExpressionExecutors - the executors of each function parametersconfigReader - the config reader of windowoutputExpectsExpiredEvents - is expired events sent as outputsiddhiQueryContext - the context of the siddhi queryprotected void processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, GroupingWindowProcessor.GroupingKeyPopulator groupingKeyPopulater, io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState state)
GroupingWindowProcessorprocessEventChunk in class GroupingWindowProcessor<io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState>streamEventChunk - the event chunk that need to be processednextProcessor - the next processor to which the success events need to be passedstreamEventCloner - helps to clone the incoming event for local storage or modificationgroupingKeyPopulater - helps to populate the events with the grouping keystate - current state of the processorpublic void start()
ExternalReferencedHolderstart in interface ExternalReferencedHolderpublic void stop()
ExternalReferencedHolderstop in interface ExternalReferencedHolderpublic CompiledCondition compileCondition(io.siddhi.query.api.expression.Expression condition, MatchingMetaInfoHolder matchingMetaInfoHolder, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String,Table> tableMap, io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState state, SiddhiQueryContext siddhiQueryContext)
GroupingFindableWindowProcessorcompileCondition in class GroupingFindableWindowProcessor<io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState>condition - the matching conditionmatchingMetaInfoHolder - the meta structure of the incoming matchingEventvariableExpressionExecutors - the list of variable ExpressionExecutors already createdtableMap - map of event tablesstate - current query statesiddhiQueryContext - current siddhi query contextpublic StreamEvent find(StateEvent matchingEvent, CompiledCondition compiledCondition, StreamEventCloner streamEventCloner, io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState state)
GroupingFindableWindowProcessorfind in class GroupingFindableWindowProcessor<io.siddhi.core.query.processor.stream.window.SessionWindowProcessor.WindowState>matchingEvent - 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 ProcessorstreamEventCloner - stream event clonerstate - current query state @return the matched eventsCopyright © 2019. All rights reserved.