public enum CapacityPolicy extends java.lang.Enum<CapacityPolicy>
The policy may be lenient or strict. A lenient policy allows the cache to grow beyond its set limit. The limit will be increased, and a warning will be logged when this occurs. A strict policy will not allow the cache to grow beyond its limit, and an exception will be thrown in the event capacity for a new element cannot be ensured.
Enum Constant and Description |
---|
LENIENT
Allow the cache to grow.
|
STRICT
Do not allow the cache to grow.
|
Modifier and Type | Method and Description |
---|---|
static CapacityPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CapacityPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CapacityPolicy LENIENT
public static final CapacityPolicy STRICT
public static CapacityPolicy[] values()
for (CapacityPolicy c : CapacityPolicy.values()) System.out.println(c);
public static CapacityPolicy 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 null