Search in sources :

Example 1 with LogFileSizeChekerEvent

use of org.gluu.oxtrust.service.cdi.event.LogFileSizeChekerEvent in project oxTrust by GluuFederation.

the class LogDir method initTimer.

public void initTimer() {
    log.info("Initializing Log File Size Checker Timer");
    this.isActive = new AtomicBoolean(false);
    final int delay = 2 * 60;
    final int interval = DEFAULT_INTERVAL;
    timerEvent.fire(new TimerEvent(new TimerSchedule(delay, interval), new LogFileSizeChekerEvent(), Scheduled.Literal.INSTANCE));
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TimerSchedule(org.xdi.service.timer.schedule.TimerSchedule) LogFileSizeChekerEvent(org.gluu.oxtrust.service.cdi.event.LogFileSizeChekerEvent) TimerEvent(org.xdi.service.timer.event.TimerEvent)

Aggregations

AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 LogFileSizeChekerEvent (org.gluu.oxtrust.service.cdi.event.LogFileSizeChekerEvent)1 TimerEvent (org.xdi.service.timer.event.TimerEvent)1 TimerSchedule (org.xdi.service.timer.schedule.TimerSchedule)1