Class MemoryStoreEvictionPolicy

  • All Implemented Interfaces:
    java.io.Serializable

    public final class MemoryStoreEvictionPolicy
    extends java.lang.Object
    implements java.io.Serializable
    A typesafe enumeration of eviction policies. The policy used to evict elements from the MemoryStore. This can be one of:
    1. LRU - least recently used
    2. LFU - least frequently used
    3. FIFO - first in first out, the oldest element by creation time
    The default value is LRU
    Since:
    1.2
    Version:
    $Id$
    Author:
    Greg Luck
    See Also:
    Serialized Form
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String representation of the policy
      • fromString

        public static MemoryStoreEvictionPolicy fromString​(java.lang.String policy)
        Converts a string representation of the policy into a policy.
        Parameters:
        policy - either LRU, LFU or FIFO
        Returns:
        one of the static instances