Search in sources :

Example 1 with DelayEventRunnable

use of com.alibaba.jstorm.schedule.DelayEventRunnable in project jstorm by alibaba.

the class DelayStatusTransitionCallback method execute.

@Override
public <T> Object execute(T... args) {
    int delaySecs = getDelaySeconds(args);
    LOG.info("Delaying event " + newType + " for " + delaySecs + " secs for " + topologyid);
    data.getScheduExec().schedule(new DelayEventRunnable(data, topologyid, nextAction, args), delaySecs, TimeUnit.SECONDS);
    return new StormStatus(delaySecs, newType);
}
Also used : StormStatus(com.alibaba.jstorm.cluster.StormStatus) DelayEventRunnable(com.alibaba.jstorm.schedule.DelayEventRunnable)

Aggregations

StormStatus (com.alibaba.jstorm.cluster.StormStatus)1 DelayEventRunnable (com.alibaba.jstorm.schedule.DelayEventRunnable)1