src/main/java/com/stoyanr/evictor/scheduler/RegularTaskEvictionScheduler.java
/**
     * Cancels 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.
     */
Cancels 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.
Cancels 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 cancel() {
        this.active = hasScheduledEvictions();
        if (this.future != null && !this.active) {
            this.future.cancel(false);
            this.future = null;
        }
    }
private synchronized void cancel ( ) { this . active = hasScheduledEvictions ( ) ; if ( this . future != null && ! this . active ) { this . future . cancel ( false ) ; this . future = null ; } }
Cancels the task atomically.
Cancels the task atomically .
// Check whether we have evictions scheduled and cancel the task if // currently active // but there are no evictions.