|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<CacheReferenceType>
com.evanmclean.evlib.cache.CacheReferenceType
public enum CacheReferenceType
Indicates how values in a ConcurrentHashMapCache are referenced.
| Enum Constant Summary | |
|---|---|
SOFT
Value is wrapped with a SoftReference. |
|
STRONG
Value is kept in the cache until it expires or is explicitly removed. |
|
WEAK
Value is wrapped with a WeakReference. |
|
| Method Summary | |
|---|---|
static CacheReferenceType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CacheReferenceType[] |
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 |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final CacheReferenceType STRONG
public static final CacheReferenceType SOFT
SoftReference. If you want caches that will
drop values when memory gets tight, this is probably the one you want.
public static final CacheReferenceType WEAK
WeakReference.
| Method Detail |
|---|
public static CacheReferenceType[] values()
for (CacheReferenceType c : CacheReferenceType.values()) System.out.println(c);
public static CacheReferenceType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||