org.geotools.caching
Class LRUEvictionPolicy

java.lang.Object
  extended by org.geotools.caching.LRUEvictionPolicy
All Implemented Interfaces:
EvictionPolicy

public class LRUEvictionPolicy
extends java.lang.Object
implements EvictionPolicy

Least-Recently Used Eviction Policy

Removes the oldest items from the cache.


Constructor Summary
LRUEvictionPolicy(EvictableTree tree)
           
 
Method Summary
 void access(NodeIdentifier node)
          Called when a node is accessed.
 boolean evict()
          Removes the node from next node in the policy from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRUEvictionPolicy

public LRUEvictionPolicy(EvictableTree tree)
Method Detail

evict

public boolean evict()
Description copied from interface: EvictionPolicy
Removes the node from next node in the policy from the cache.

Specified by:
evict in interface EvictionPolicy
Returns:
false if nothing to evict; otherwise returns true

access

public void access(NodeIdentifier node)
Description copied from interface: EvictionPolicy
Called when a node is accessed.

Specified by:
access in interface EvictionPolicy
Parameters:
node - node accessed


Copyright © 1996-2010 Geotools. All Rights Reserved.