use of org.xdi.service.timer.schedule.TimerSchedule in project oxTrust by GluuFederation.
the class StatusCheckerTimer method initTimer.
public void initTimer() {
log.info("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 StatusCheckerTimerEvent(), Scheduled.Literal.INSTANCE));
}
use of org.xdi.service.timer.schedule.TimerSchedule in project oxTrust by GluuFederation.
the class SvnSyncTimer method initTimer.
public void initTimer() {
log.debug("Initializing SVN Sync Timer");
if (!appConfiguration.isPersistSVN()) {
return;
}
final int delay = 30;
final int interval = DEFAULT_INTERVAL;
timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new SvnSyncEvent(), Scheduled.Literal.INSTANCE));
}
use of org.xdi.service.timer.schedule.TimerSchedule in project oxAuth by GluuFederation.
the class KeyGeneratorTimer method initTimer.
public void initTimer() {
log.debug("Initializing Key Generator Timer");
this.isActive = new AtomicBoolean(false);
int interval = appConfiguration.getKeyRegenerationInterval();
if (interval <= 0) {
interval = DEFAULT_INTERVAL;
}
interval = interval * 3600;
timerEvent.fire(new TimerEvent(new TimerSchedule(interval, interval), new KeyGenerationEvent(), Scheduled.Literal.INSTANCE));
}
use of org.xdi.service.timer.schedule.TimerSchedule in project oxAuth by GluuFederation.
the class LdapStatusTimer method initTimer.
public void initTimer() {
log.info("Initializing Ldap Status Timer");
this.isActive = new AtomicBoolean(false);
timerEvent.fire(new TimerEvent(new TimerSchedule(DEFAULT_INTERVAL, DEFAULT_INTERVAL), new LdapStatusEvent(), Scheduled.Literal.INSTANCE));
}
use of org.xdi.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
final int delay = 1 * 60;
final int interval = DEFAULT_INTERVAL;
timerEvent.fire(new TimerEvent(new TimerSchedule(delay, DEFAULT_INTERVAL), new CacheRefreshEvent(), Scheduled.Literal.INSTANCE));
this.lastFinishedTime = System.currentTimeMillis();
}
Aggregations