public enum ECachingStrategy extends java.lang.Enum<ECachingStrategy>
Enum Constant and Description |
---|
LRU
Last recently used caching strategy.
|
MEMORY
Memory sensitive caching using
SoftReference s. |
OFF
Performs no caching at all.
|
SINGLE
Caches exactly one element (basically the same as an LRU cache with size
1.
|
UNLIMITED
Unlimited caching, i.e.
|
Modifier and Type | Method and Description |
---|---|
<K,V> ICacheBackend<K,V> |
getBackend(int parameter)
Returns the cache backend for the strategy (factory method).
|
static ECachingStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ECachingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ECachingStrategy OFF
public static final ECachingStrategy SINGLE
public static final ECachingStrategy LRU
public static final ECachingStrategy MEMORY
SoftReference
s. This allows the
cache to keep elements as long as memory is available, but free memory
when requested by the garbage collector.public static final ECachingStrategy UNLIMITED
public static ECachingStrategy[] values()
for (ECachingStrategy c : ECachingStrategy.values()) System.out.println(c);
public static ECachingStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic <K,V> ICacheBackend<K,V> getBackend(int parameter)
parameter
- the parameter used for the caching strategy. This is ignored
by those strategies that are not parameterizable.