Search in sources :

Example 1 with PreStateProcessor

use of org.wso2.siddhi.core.query.input.stream.state.PreStateProcessor in project siddhi by wso2.

the class AbsentLogicalPreStateProcessor method cloneProcessor.

@Override
public PreStateProcessor cloneProcessor(String key) {
    AbsentLogicalPreStateProcessor logicalPreStateProcessor = new AbsentLogicalPreStateProcessor(logicalType, stateType, withinStates, waitingTimeConstant);
    cloneProperties(logicalPreStateProcessor, key);
    logicalPreStateProcessor.init(siddhiAppContext, queryName);
    // Set the scheduler
    siddhiAppContext.addEternalReferencedHolder(logicalPreStateProcessor);
    EntryValveProcessor entryValveProcessor = new EntryValveProcessor(siddhiAppContext);
    entryValveProcessor.setToLast(logicalPreStateProcessor);
    Scheduler scheduler = SchedulerParser.parse(siddhiAppContext.getScheduledExecutorService(), entryValveProcessor, siddhiAppContext);
    logicalPreStateProcessor.setScheduler(scheduler);
    return logicalPreStateProcessor;
}
Also used : Scheduler(org.wso2.siddhi.core.util.Scheduler) EntryValveProcessor(org.wso2.siddhi.core.query.input.stream.single.EntryValveProcessor)

Example 2 with PreStateProcessor

use of org.wso2.siddhi.core.query.input.stream.state.PreStateProcessor in project siddhi by wso2.

the class AbsentStreamPreStateProcessor method cloneProcessor.

@Override
public PreStateProcessor cloneProcessor(String key) {
    AbsentStreamPreStateProcessor streamPreStateProcessor = new AbsentStreamPreStateProcessor(stateType, withinStates, waitingTimeConstant);
    cloneProperties(streamPreStateProcessor, key);
    streamPreStateProcessor.init(siddhiAppContext, queryName);
    // Set the scheduler
    siddhiAppContext.addEternalReferencedHolder(streamPreStateProcessor);
    EntryValveProcessor entryValveProcessor = new EntryValveProcessor(siddhiAppContext);
    entryValveProcessor.setToLast(streamPreStateProcessor);
    Scheduler scheduler = SchedulerParser.parse(siddhiAppContext.getScheduledExecutorService(), entryValveProcessor, siddhiAppContext);
    streamPreStateProcessor.setScheduler(scheduler);
    return streamPreStateProcessor;
}
Also used : Scheduler(org.wso2.siddhi.core.util.Scheduler) EntryValveProcessor(org.wso2.siddhi.core.query.input.stream.single.EntryValveProcessor)

Aggregations

EntryValveProcessor (org.wso2.siddhi.core.query.input.stream.single.EntryValveProcessor)2 Scheduler (org.wso2.siddhi.core.util.Scheduler)2