org.terracotta.cache.evictor
Class EvictionScheduler

java.lang.Object
  extended by org.terracotta.cache.evictor.EvictionScheduler

public class EvictionScheduler
extends Object

The scheduler is responsible for creating a background eviction thread and kicking it off where the thread will call the Evictor after a specified delay in a loop. The thread will run forever unless stopped. The start() method can be called again after stop.


Constructor Summary
EvictionScheduler(CacheConfig config, Evictor<?> evictor)
          Construct a scheduler that pauses for the delay and whose background thread name is based on the timerName.
 
Method Summary
 void start()
          Actually kick off the thread.
 void stop()
          Tells background thread to stop at next opportunity and kills the reference to it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvictionScheduler

public EvictionScheduler(CacheConfig config,
                         Evictor<?> evictor)
Construct a scheduler that pauses for the delay and whose background thread name is based on the timerName.

Parameters:
config - The eviction configuration
evictor - The evictor to callback on
Method Detail

start

public void start()
Actually kick off the thread.


stop

public void stop()
Tells background thread to stop at next opportunity and kills the reference to it



Copyright © 2010 Terracotta, Inc.. All Rights Reserved.