Search in sources :

Example 1 with ExpirationEvent

use of org.gluu.oxauth.service.cdi.event.ExpirationEvent in project oxAuth by GluuFederation.

the class ExpirationNotificatorTimer method initTimer.

public void initTimer() {
    log.debug("Initializing ExpirationNotificatorTimer");
    this.isActive = new AtomicBoolean(false);
    expiringMap = ExpiringMap.builder().expirationPolicy(ExpirationPolicy.CREATED).maxSize(appConfiguration.getExpirationNotificatorMapSizeLimit()).variableExpiration().build();
    expiringMap.addExpirationListener(this);
    timerEvent.fire(new TimerEvent(new TimerSchedule(DEFAULT_INTERVAL, DEFAULT_INTERVAL), new ExpirationEvent(), Scheduled.Literal.INSTANCE));
    this.lastFinishedTime = System.currentTimeMillis();
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TimerSchedule(org.gluu.service.timer.schedule.TimerSchedule) ExpirationEvent(org.gluu.oxauth.service.cdi.event.ExpirationEvent) TimerEvent(org.gluu.service.timer.event.TimerEvent)

Aggregations

AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 ExpirationEvent (org.gluu.oxauth.service.cdi.event.ExpirationEvent)1 TimerEvent (org.gluu.service.timer.event.TimerEvent)1 TimerSchedule (org.gluu.service.timer.schedule.TimerSchedule)1