Example usage for Java org.apache.commons.pool2 PooledObject fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | allocate() Allocates the object. |
boolean | deallocate() Deallocates the object and sets it PooledObjectState#IDLE IDLE if it is currently PooledObjectState#ALLOCATED ALLOCATED . |
boolean | endEvictionTest(Deque Called to inform the object that the eviction test has ended. |
long | getActiveTimeMillis() Obtain the time in milliseconds that this object last spent in the the active state (it may still be active in which case subsequent calls will return an increased value). |
long | getCreateTime() Obtain the time (using the same basis as System#currentTimeMillis() ) that this object was created. |
long | getIdleTimeMillis() Obtain the time in milliseconds that this object last spend in the the idle state (it may still be idle in which case subsequent calls will return an increased value). |
long | getLastUsedTime() Return an estimate of the last time this object was used. |
T | getObject() Obtain the underlying object that is wrapped by this instance of PooledObject . |
PooledObjectState | getState() Returns the state of this object. |
void | invalidate() Sets the state to PooledObjectState#INVALID INVALID |
void | markAbandoned() Marks the pooled object as abandoned. |
void | markReturning() Marks the object as returning to the pool. |
void | printStackTrace(PrintWriter writer) Prints the stack trace of the code that borrowed this pooled object and the stack trace of the last code to use this object (if available) to the supplied writer. |
void | setLogAbandoned(boolean logAbandoned) Is abandoned object tracking being used? |
boolean | startEvictionTest() Attempt to place the pooled object in the PooledObjectState#EVICTION state. |
void | use() Record the current stack trace as the last time the object was used. |