PooledObjectState

Provides the possible states that a {@link PooledObject} may be in.

Values

ValueMeaning
IDLE

In the queue, not in use.

ALLOCATED

In use.

EVICTION

In the queue, currently being tested for possible eviction.

EVICTION_RETURN_TO_HEAD

Not in the queue, currently being tested for possible eviction. An attempt to borrow the object was made while being tested which removed it from the queue. It should be returned to the head of the queue once eviction testing completes. TODO: Consider allocating object and ignoring the result of the eviction test.

VALIDATION

In the queue, currently being validated.

VALIDATION_PREALLOCATED

Not in queue, currently being validated. The object was borrowed while being validated and since testOnBorrow was configured, it was removed from the queue and pre-allocated. It should be allocated once validation completes.

VALIDATION_RETURN_TO_HEAD

Not in queue, currently being validated. An attempt to borrow the object was made while previously being tested for eviction which removed it from the queue. It should be returned to the head of the queue once validation completes.

INVALID

Failed maintenance (e.g. eviction test or validation) and will be / has been destroyed

ABANDONED

Deemed abandoned, to be invalidated.

RETURNING

Returning to the pool.

Meta