public enum ReclaimAction extends java.lang.Enum<ReclaimAction>
GenericObjectPool
decides that it is time to reclaim an object from a burrower, e.g. because
the maximum lease time expired or the object is considered abandoned.| Enum Constant and Description |
|---|
DESTROY_OBJECT
Another form of reclaiming: not the object itself is reclaimed but rather
the resources.
|
NO_ACTION
Do nothing.
|
RECLAIM_OBJECT
reclaim the object; may cause problems if wrapping is not enabled since the
previous burrower may still have a reference to the object.
|
RECLAIM_OR_DESTROY_OBJECT
This is sort of meta-action, a combination of
RECLAIM_OBJECT and
DESTROY_OBJECT. |
RELEASE_OBJECT
Simply release the object from the pool without destroying it.
|
| Modifier and Type | Method and Description |
|---|---|
static ReclaimAction |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ReclaimAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReclaimAction NO_ACTION
ObjectPoolListener that logs such errors. (When objects aren't
properly checked in, this is basically an error and reclaiming them is a
form of error handling.)
Please be aware, that if nothing is done and enough objects aren't returned to the pool, at some point, the pool will become exhausted and bring the whole system to a halt; at least those parts, that use the pool.
public static final ReclaimAction RECLAIM_OBJECT
public static final ReclaimAction DESTROY_OBJECT
public static final ReclaimAction RECLAIM_OR_DESTROY_OBJECT
RECLAIM_OBJECT and
DESTROY_OBJECT. The first will be chosen if wrapping is enabled,
the second if not. Both will free up a slot.public static final ReclaimAction RELEASE_OBJECT
public static ReclaimAction[] values()
for (ReclaimAction c : ReclaimAction.values()) System.out.println(c);
public static ReclaimAction 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