org.ehcache.config
Enum Eviction.Prioritizer

java.lang.Object
  extended by java.lang.Enum<Eviction.Prioritizer>
      extended by org.ehcache.config.Eviction.Prioritizer
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Eviction.Prioritizer>, java.util.Comparator<Cache.Entry<java.lang.Object,java.lang.Object>>, EvictionPrioritizer<java.lang.Object,java.lang.Object>
Enclosing class:
Eviction

public static enum Eviction.Prioritizer
extends java.lang.Enum<Eviction.Prioritizer>
implements EvictionPrioritizer<java.lang.Object,java.lang.Object>

Enumeration holding default EvictionPrioritizer instances.


Enum Constant Summary
FIFO
          First In, First Out EvictionPrioritizer.
LFU
          Least Frequently Used EvictionPrioritizer.
LRU
          Least Recently Used EvictionPrioritizer.
 
Method Summary
static Eviction.Prioritizer valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Eviction.Prioritizer[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Enum Constant Detail

LRU

public static final Eviction.Prioritizer LRU
Least Recently Used EvictionPrioritizer.

Ranks eviction candidates by their last access time. The entry which was last accessed the longest time ago is considered the most eligible for eviction.


LFU

public static final Eviction.Prioritizer LFU
Least Frequently Used EvictionPrioritizer.

Ranks eviction candidates by their frequency of use. The entry which has the lowest hit rate is considered the most eligible for eviction.


FIFO

public static final Eviction.Prioritizer FIFO
First In, First Out EvictionPrioritizer.

Ranks eviction candidates by their time of creation. The entry which was created the earliest is considered the most eligible for eviction.

Method Detail

values

public static Eviction.Prioritizer[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Eviction.Prioritizer c : Eviction.Prioritizer.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Eviction.Prioritizer valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null