IPooledObject

Undocumented in source.

Members

Functions

allocate
bool allocate()

Allocates the object.

deallocate
bool deallocate()

Deallocates the object and sets it {@link PooledObjectState#IDLE IDLE} if it is currently {@link PooledObjectState#ALLOCATED ALLOCATED}.

getActiveTimeMillis
long getActiveTimeMillis()

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).

getCreateTime
long getCreateTime()

Obtains the time (using the same basis as {@link DateTimeHelper.currentTimeMillis()}) that this object was created.

getIdleTimeMillis
long getIdleTimeMillis()

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).

getLastBorrowTime
long getLastBorrowTime()

Obtains the time the wrapped object was last borrowed.

getLastReturnTime
long getLastReturnTime()

Obtains the time the wrapped object was last returned.

getLastUsedTime
long getLastUsedTime()

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()}.

getState
PooledObjectState getState()

Returns the state of this object. @return state

invalidate
void invalidate()

Sets the state to {@link PooledObjectState#INVALID INVALID}

markAbandoned
void markAbandoned()

Marks the pooled object as abandoned.

markReturning
void markReturning()

Marks the object as returning to the pool.

objectToString
string objectToString()
Undocumented in source.
objectType
TypeInfo objectType()
Undocumented in source.
opEquals
bool opEquals(IPooledObject obj)
Undocumented in source.
setLogAbandoned
void setLogAbandoned(bool logAbandoned)

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.

startEvictionTest
bool startEvictionTest()

Attempts to place the pooled object in the {@link PooledObjectState#EVICTION} state.

toHash
size_t toHash()
Undocumented in source.
toString
string toString()

Provides a string form of the wrapper for debug purposes. The format is not fixed and may change at any time. <p> {@inheritDoc}

use
void use()

Record the current stack trace as the last time the object was used.

Meta