org.terracotta.cache.evictor
Class Evictor<K>

java.lang.Object
  extended by org.terracotta.cache.evictor.Evictor<K>

public class Evictor<K>
extends Object

The evictor watches the Evictable and is run in a loop, periodically running an eviction of all keys existent locally in this node.


Constructor Summary
Evictor(Evictable<K> store)
          Construct evictor with the evictable store to evict on.
Evictor(Evictable<K> store, EvictionListener evictionListener)
          Construct evictor with the evictable store to evict on.
 
Method Summary
 void postRun()
          Stop running - call lifecycle event
 void run()
          Run evictor run!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Evictor

public Evictor(Evictable<K> store)
Construct evictor with the evictable store to evict on. No EvictionListener is specified so the NullEvictionListener is used - this listener does not do orphan eviction.

Parameters:
store - The evictable collection

Evictor

public Evictor(Evictable<K> store,
               EvictionListener evictionListener)
Construct evictor with the evictable store to evict on. Allows specification of an EvictionListener that can handle orphan eviction or potentially other tasks.

Parameters:
store - The evictable store
evictionListener - The eviction listener
Method Detail

run

public void run()
Run evictor run!

Throws:
RuntimeException - if an error occurs

postRun

public void postRun()
Stop running - call lifecycle event



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