public enum EvictionStrategy extends Enum<EvictionStrategy>
Enum Constant and Description |
---|
EXCEPTION
Strategy where the cache will block new entries from being written if they would exceed the configured size
|
FIFO
Deprecated.
|
LIRS
Deprecated.
|
LRU
Deprecated.
|
MANUAL
Strategy where the cache does nothing but the user is assumed to manually invoke evict method
|
NONE
Eviction Strategy where nothing is done by the cache and the user is probably not going to use eviction manually
|
REMOVE
Strategy where the cache will remove entries to make room for new ones while staying under the configured size
|
UNORDERED
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled()
Whether or not the cache will do something due to the strategy
|
boolean |
isExceptionBased()
The cache will throw exceptions to prevent memory growth
|
boolean |
isRemovalBased()
The cache will remove other entries to make room to limit memory growth
|
static EvictionStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EvictionStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Deprecated public static final EvictionStrategy UNORDERED
@Deprecated public static final EvictionStrategy FIFO
@Deprecated public static final EvictionStrategy LRU
@Deprecated public static final EvictionStrategy LIRS
public static final EvictionStrategy NONE
public static final EvictionStrategy MANUAL
public static final EvictionStrategy REMOVE
public static final EvictionStrategy EXCEPTION
public static EvictionStrategy[] values()
for (EvictionStrategy c : EvictionStrategy.values()) System.out.println(c);
public static EvictionStrategy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isEnabled()
public boolean isExceptionBased()
public boolean isRemovalBased()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.