Search in sources :

Example 1 with JudgeNotifyTimerTask

use of com.creditease.uav.feature.runtimenotify.task.JudgeNotifyTimerTask in project uavstack by uavorg.

the class TimerNotifyWorker method run.

@Override
public void run() {
    RuntimeNotifyStrategyMgr strategyMgr = (RuntimeNotifyStrategyMgr) getConfigManager().getComponent(this.feature, "RuntimeNotifyStrategyMgr");
    HashSet<NotifyStrategy> strategies = new HashSet<NotifyStrategy>(strategyMgr.getStrategies());
    for (NotifyStrategy stra : strategies) {
        if (stra.getType() != NotifyStrategy.Type.TIMER) {
            continue;
        }
        I1NQueueWorker n1nqw = get1NQueueWorkerMgr().getQueueWorker(this.feature, RuntimeNotifyCatcher.QWORKER_NAME);
        n1nqw.put(new JudgeNotifyTimerTask(JudgeNotifyTask.class.getSimpleName(), feature, System.currentTimeMillis(), stra));
    }
}
Also used : JudgeNotifyTimerTask(com.creditease.uav.feature.runtimenotify.task.JudgeNotifyTimerTask) NotifyStrategy(com.creditease.uav.feature.runtimenotify.NotifyStrategy) HashSet(java.util.HashSet) I1NQueueWorker(com.creditease.agent.spi.I1NQueueWorker)

Aggregations

I1NQueueWorker (com.creditease.agent.spi.I1NQueueWorker)1 NotifyStrategy (com.creditease.uav.feature.runtimenotify.NotifyStrategy)1 JudgeNotifyTimerTask (com.creditease.uav.feature.runtimenotify.task.JudgeNotifyTimerTask)1 HashSet (java.util.HashSet)1