com.reardencommerce.kernel.collections.shared.evictable
Enum ConcurrentLinkedHashMap.EvictionPolicy

java.lang.Object
  extended by java.lang.Enum<ConcurrentLinkedHashMap.EvictionPolicy>
      extended by com.reardencommerce.kernel.collections.shared.evictable.ConcurrentLinkedHashMap.EvictionPolicy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ConcurrentLinkedHashMap.EvictionPolicy>
Enclosing class:
ConcurrentLinkedHashMap<K,V>

public static enum ConcurrentLinkedHashMap.EvictionPolicy
extends java.lang.Enum<ConcurrentLinkedHashMap.EvictionPolicy>

The replacement policy to apply to determine which entry to discard when the capacity has been reached.


Enum Constant Summary
FIFO
          Evicts entries based on insertion order.
LRU
          Evicts entries based on how recently they are used, with the least recent evicted first.
SECOND_CHANCE
          Evicts entries based on insertion order, but gives an entry a "second chance" if it has been requested recently.
 
Method Summary
static ConcurrentLinkedHashMap.EvictionPolicy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ConcurrentLinkedHashMap.EvictionPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FIFO

public static final ConcurrentLinkedHashMap.EvictionPolicy FIFO
Evicts entries based on insertion order.


SECOND_CHANCE

public static final ConcurrentLinkedHashMap.EvictionPolicy SECOND_CHANCE
Evicts entries based on insertion order, but gives an entry a "second chance" if it has been requested recently.


LRU

public static final ConcurrentLinkedHashMap.EvictionPolicy LRU
Evicts entries based on how recently they are used, with the least recent evicted first.

Method Detail

values

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

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

valueOf

public static ConcurrentLinkedHashMap.EvictionPolicy 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


Copyright © 2009-2010 Ignite Realtime. All Rights Reserved.