Search in sources :

Example 1 with NotificationEventRecordLiferKeeper

use of com.creditease.agent.feature.globalnotify.NotificationEventRecordLiferKeeper in project uavstack by uavorg.

the class GlobalNotificationAgent method start.

@Override
public void start() {
    // create GlobalNotificationManager
    GlobalNotificationManager amnm = new GlobalNotificationManager("GlobalNotificationManager", this.feature, "notifyhandlers");
    // start GlobalNotificationManager
    globalNotificationManager_es.execute(amnm);
    if (log.isTraceEnable()) {
        log.info(this, "GlobalNotificationManager started");
    }
    long expireTime = DataConvertHelper.toLong(this.getConfigManager().getFeatureConfiguration(this.feature, "expireTime"), 4 * 3600) * 1000;
    NotificationEventRecordLiferKeeper lifeKeeper = new NotificationEventRecordLiferKeeper("NotificationEventRecordLiferKeeper", this.feature, expireTime);
    this.getTimerWorkManager().scheduleWork("NotificationEventRecordLiferKeeper", lifeKeeper, 0, expireTime / 2);
    if (log.isTraceEnable()) {
        log.info(this, "NotificationEventRecordLiferKeeper started");
    }
}
Also used : NotificationEventRecordLiferKeeper(com.creditease.agent.feature.globalnotify.NotificationEventRecordLiferKeeper) GlobalNotificationManager(com.creditease.agent.feature.globalnotify.GlobalNotificationManager)

Aggregations

GlobalNotificationManager (com.creditease.agent.feature.globalnotify.GlobalNotificationManager)1 NotificationEventRecordLiferKeeper (com.creditease.agent.feature.globalnotify.NotificationEventRecordLiferKeeper)1