use of org.gluu.service.timer.schedule.TimerSchedule in project oxTrust by GluuFederation.
the class CleanerTimer method initTimer.
public void initTimer() {
log.debug("Initializing Cleaner Timer");
cleanUpLogger.addNewLogLine("Initializing Cleaner Timer at:" + new Date());
this.isActive = new AtomicBoolean(false);
// Schedule to start cleaner every 1 minute
cleanerEvent.fire(new TimerEvent(new TimerSchedule(DEFAULT_INTERVAL, DEFAULT_INTERVAL), new CleanerEvent(), Scheduled.Literal.INSTANCE));
cleanUpLogger.addNewLogLine("Initialization Done at :" + new Date());
}
use of org.gluu.service.timer.schedule.TimerSchedule in project oxTrust by GluuFederation.
the class UpdateChecker method initTimer.
public void initTimer() {
this.isActive = new AtomicBoolean(false);
final int delay = 1 * 60;
final int interval = DEFAULT_INTERVAL;
timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new StatusCheckerTimerEvent(), Scheduled.Literal.INSTANCE));
}
use of org.gluu.service.timer.schedule.TimerSchedule in project oxCore by GluuFederation.
the class CustomScriptManager method initTimer.
@Asynchronous
public void initTimer(List<CustomScriptType> supportedCustomScriptTypes) {
this.supportedCustomScriptTypes = supportedCustomScriptTypes;
configure();
final int delay = 30;
final int interval = DEFAULT_INTERVAL;
reload(true);
timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new UpdateScriptEvent(), Scheduled.Literal.INSTANCE));
}
use of org.gluu.service.timer.schedule.TimerSchedule in project oxTrust by GluuFederation.
the class CacheRefreshTimer method initTimer.
public void initTimer() {
log.info("Initializing Cache Refresh Timer");
this.isActive = new AtomicBoolean(false);
// Clean up previous Inum cache
CacheRefreshConfiguration cacheRefreshConfiguration = configurationFactory.getCacheRefreshConfiguration();
if (cacheRefreshConfiguration != null) {
String snapshotFolder = cacheRefreshConfiguration.getSnapshotFolder();
if (StringHelper.isNotEmpty(snapshotFolder)) {
String inumCachePath = getInumCachePath(cacheRefreshConfiguration);
objectSerializationService.cleanup(inumCachePath);
}
}
// Schedule to start cache refresh every 1 minute
timerEvent.fire(new TimerEvent(new TimerSchedule(DEFAULT_INTERVAL, DEFAULT_INTERVAL), new CacheRefreshEvent(), Scheduled.Literal.INSTANCE));
this.lastFinishedTime = System.currentTimeMillis();
}
use of org.gluu.service.timer.schedule.TimerSchedule in project oxTrust by GluuFederation.
the class StatusCheckerDaily method initTimer.
public void initTimer() {
log.debug("Initializing Daily Status Cheker Timer");
this.isActive = new AtomicBoolean(false);
final int delay = 1 * 60;
final int interval = DEFAULT_INTERVAL;
timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new StatusCheckerDailyEvent(), Scheduled.Literal.INSTANCE));
}
Aggregations