public enum CacheReferenceType extends java.lang.Enum<CacheReferenceType>
Enum Constant and Description |
---|
HARD
Constant indicating that hard references should be used.
|
SOFT
Constant indicating that soft references should be used.
|
WEAK
Constant indicating that weak references should be used.
|
Modifier and Type | Method and Description |
---|---|
static CacheReferenceType |
getDefault()
The default policy is set to WEAK to reduce the chance that out-of-memory errors occur
as caches fill, and stay backwards compatible with prior Esper releases.
|
static CacheReferenceType |
valueOf(java.lang.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.
|
public static final CacheReferenceType HARD
Does not allow garbage collection to remove cache entries.
public static final CacheReferenceType SOFT
Allows garbage collection to remove cache entries only after all weak references have been collected.
public static final CacheReferenceType WEAK
Allows garbage collection to remove cache entries.
public static CacheReferenceType[] values()
for (CacheReferenceType c : CacheReferenceType.values()) System.out.println(c);
public static CacheReferenceType 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 static CacheReferenceType getDefault()