Search in sources :

Example 21 with Scheduler

use of org.wso2.siddhi.core.util.Scheduler in project siddhi by wso2.

the class AllPerTimeOutputRateLimiter method start.

@Override
public void start() {
    scheduler = SchedulerParser.parse(scheduledExecutorService, this, siddhiAppContext);
    scheduler.setStreamEventPool(new StreamEventPool(0, 0, 0, 5));
    scheduler.init(lockWrapper, queryName);
    long currentTime = System.currentTimeMillis();
    scheduledTime = currentTime + value;
    scheduler.notifyAt(scheduledTime);
}
Also used : StreamEventPool(org.wso2.siddhi.core.event.stream.StreamEventPool)

Example 22 with Scheduler

use of org.wso2.siddhi.core.util.Scheduler in project siddhi by wso2.

the class FirstPerTimeOutputRateLimiter method start.

@Override
public void start() {
    scheduler = SchedulerParser.parse(scheduledExecutorService, this, siddhiAppContext);
    scheduler.setStreamEventPool(new StreamEventPool(0, 0, 0, 5));
    scheduler.init(lockWrapper, queryName);
    long currentTime = System.currentTimeMillis();
    scheduledTime = currentTime + value;
    scheduler.notifyAt(scheduledTime);
}
Also used : StreamEventPool(org.wso2.siddhi.core.event.stream.StreamEventPool)

Example 23 with Scheduler

use of org.wso2.siddhi.core.util.Scheduler in project siddhi by wso2.

the class LastGroupByPerTimeOutputRateLimiter method start.

@Override
public void start() {
    scheduler = SchedulerParser.parse(scheduledExecutorService, this, siddhiAppContext);
    scheduler.setStreamEventPool(new StreamEventPool(0, 0, 0, 5));
    scheduler.init(lockWrapper, queryName);
    long currentTime = System.currentTimeMillis();
    scheduledTime = currentTime + value;
    scheduler.notifyAt(scheduledTime);
}
Also used : StreamEventPool(org.wso2.siddhi.core.event.stream.StreamEventPool)

Example 24 with Scheduler

use of org.wso2.siddhi.core.util.Scheduler in project siddhi by wso2.

the class AggregationWindowedPerSnapshotOutputRateLimiter method start.

@Override
public void start() {
    scheduler = SchedulerParser.parse(scheduledExecutorService, this, siddhiAppContext);
    scheduler.setStreamEventPool(new StreamEventPool(0, 0, 0, 5));
    scheduler.init(lockWrapper, queryName);
    long currentTime = System.currentTimeMillis();
    scheduledTime = currentTime + value;
    scheduler.notifyAt(scheduledTime);
}
Also used : StreamEventPool(org.wso2.siddhi.core.event.stream.StreamEventPool)

Example 25 with Scheduler

use of org.wso2.siddhi.core.util.Scheduler in project siddhi by wso2.

the class PerSnapshotOutputRateLimiter method start.

@Override
public void start() {
    scheduler = SchedulerParser.parse(scheduledExecutorService, this, siddhiAppContext);
    scheduler.setStreamEventPool(new StreamEventPool(0, 0, 0, 5));
    scheduler.init(lockWrapper, queryName);
    long currentTime = System.currentTimeMillis();
    scheduledTime = currentTime + value;
    scheduler.notifyAt(scheduledTime);
}
Also used : StreamEventPool(org.wso2.siddhi.core.event.stream.StreamEventPool)

Aggregations

StreamEventPool (org.wso2.siddhi.core.event.stream.StreamEventPool)13 Scheduler (org.wso2.siddhi.core.util.Scheduler)6 EntryValveProcessor (org.wso2.siddhi.core.query.input.stream.single.EntryValveProcessor)5 ArrayList (java.util.ArrayList)4 MetaStreamEvent (org.wso2.siddhi.core.event.stream.MetaStreamEvent)3 SingleStreamRuntime (org.wso2.siddhi.core.query.input.stream.single.SingleStreamRuntime)3 SubstitutionScheduler (org.wso2.carbon.bpmn.people.substitution.scheduler.SubstitutionScheduler)2 OperationNotSupportedException (org.wso2.siddhi.core.exception.OperationNotSupportedException)2 SiddhiAppCreationException (org.wso2.siddhi.core.exception.SiddhiAppCreationException)2 SchedulingProcessor (org.wso2.siddhi.core.query.processor.SchedulingProcessor)2 WindowProcessor (org.wso2.siddhi.core.query.processor.stream.window.WindowProcessor)2 Attribute (org.wso2.siddhi.query.api.definition.Attribute)2 ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 AbstractMap (java.util.AbstractMap)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 ExecutorService (java.util.concurrent.ExecutorService)1 ThreadFactory (java.util.concurrent.ThreadFactory)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1 SimpleSchedulerConfig (org.wso2.carbon.bpel.config.SimpleSchedulerConfig)1