Called to inform the object that the eviction test has ended.
Obtains the underlying object that is wrapped by this instance of {@link PooledObject}.
Orders instances based on idle time - i.e. the length of time since the instance was returned to the pool. Used by the GKOP idle object evictor. <p> Note: This class has a natural ordering that is inconsistent with equals if distinct objects have the same identity hash code. </p> <p> {@inheritDoc} </p>
Obtains the time (using the same basis as {@link DateTimeHelper.currentTimeMillis()}) that this object was created.
Obtains the time in milliseconds that this object last spent in the active state (it may still be active in which case subsequent calls will return an increased value).
Obtains the time in milliseconds that this object last spend in the idle state (it may still be idle in which case subsequent calls will return an increased value).
Obtains the time the wrapped object was last borrowed.
Obtains the time the wrapped object was last returned.
Returns an estimate of the last time this object was used. If the class of the pooled object implements {@link TrackedUse}, what is returned is the maximum of {@link TrackedUse#getLastUsed()} and {@link #getLastBorrowTime()}; otherwise this method gives the same value as {@link #getLastBorrowTime()}.
Provides a string form of the wrapper for debug purposes. The format is not fixed and may change at any time. <p> {@inheritDoc}
Attempts to place the pooled object in the {@link PooledObjectState#EVICTION} state.
Allocates the object.
Deallocates the object and sets it {@link PooledObjectState#IDLE IDLE} if it is currently {@link PooledObjectState#ALLOCATED ALLOCATED}.
Sets the state to {@link PooledObjectState#INVALID INVALID}
Is abandoned object tracking being used? If this is true the implementation will need to record the stack trace of the last caller to borrow this object.
Record the current stack trace as the last time the object was used.
Returns the state of this object. @return state
Marks the pooled object as abandoned.
Marks the object as returning to the pool.
Defines the wrapper that is used to track the additional information, such as state, for the pooled objects. <p> Implementations of this class are required to be thread-safe.
@param <T> the type of object in the pool