src/main/java/com/stoyanr/evictor/scheduler/DelayedTaskEvictionScheduler.java
/**
     * Schedules the task atomically. This method is synchronized to ensure
     * atomicity. The next eviction time is always queried within this
     * synchronized method and not passed as parameter to ensure consistency in
     * a concurrent environment.
     */
Schedules the task atomically. This method is synchronized to ensure
atomicity. The next eviction time is always queried within this
synchronized method and not passed as parameter to ensure consistency in
a concurrent environment.
Schedules the task atomically . This method is synchronized to ensure atomicity . The next eviction time is always queried within this synchronized method and not passed as parameter to ensure consistency in a concurrent environment .
private synchronized void schedule() {
        next = getNextEvictionTime();
        future = (next > 0) ? ses.schedule(new EvictionRunnable(), Math.max(next - System.nanoTime(), 0), NANOSECONDS) : null;
    }
private synchronized void schedule ( ) { next = getNextEvictionTime ( ) ; future = ( next > 0 ) ? ses . schedule ( new EvictionRunnable ( ) , Math . max ( next - System . nanoTime ( ) , 0 ) , NANOSECONDS ) : null ; }
Schedules the task atomically.
Schedules the task atomically .
// Get the next eviction time and reschedule the task with a delay // corresponding to the // difference between this time and the current time. If the next // eviction time is 0 // (the queue is empty), don't schedule anything.