src/main/java/com/stoyanr/evictor/scheduler/RegularTaskEvictionScheduler.java
/**
     * Schedules the task atomically. This method is synchronized to ensure
     * atomicity. The active state is always queried within this synchronized
     * method and not passed as a parameter to ensure consistency in a
     * concurrent environment.
     */
Schedules the task atomically. This method is synchronized to ensure
atomicity. The active state is always queried within this synchronized
method and not passed as a parameter to ensure consistency in a
concurrent environment.
Schedules the task atomically . This method is synchronized to ensure atomicity . The active state is always queried within this synchronized method and not passed as a parameter to ensure consistency in a concurrent environment .
private synchronized void schedule() {
        this.active = hasScheduledEvictions();
        if (this.future == null && this.active) {
            this.future = this.executorService.scheduleWithFixedDelay(new EvictionRunnable(), this.delay, this.delay, this.timeUnit);
        }
    }
private synchronized void schedule ( ) { this . active = hasScheduledEvictions ( ) ; if ( this . future == null && this . active ) { this . future = this . executorService . scheduleWithFixedDelay ( new EvictionRunnable ( ) , this . delay , this . delay , this . timeUnit ) ; } }
Schedules the task atomically.
Schedules the task atomically .
// Check whether we have evictions scheduled and schedule the task if // not currently // active, but there are evictions.