Java org.apache.commons.pool2 PooledObject fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.pool2 PooledObject fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.pool2 PooledObject.

The text is from its open source code.

Method

booleanallocate()
Allocates the object.
booleandeallocate()
Deallocates the object and sets it PooledObjectState#IDLE IDLE if it is currently PooledObjectState#ALLOCATED ALLOCATED .
booleanendEvictionTest(Deque> idleQueue)
Called to inform the object that the eviction test has ended.
longgetActiveTimeMillis()
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).
longgetCreateTime()
Obtain the time (using the same basis as System#currentTimeMillis() ) that this object was created.
longgetIdleTimeMillis()
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).
longgetLastUsedTime()
Return an estimate of the last time this object was used.
TgetObject()
Obtain the underlying object that is wrapped by this instance of PooledObject .
PooledObjectStategetState()
Returns the state of this object.
voidinvalidate()
Sets the state to PooledObjectState#INVALID INVALID
voidmarkAbandoned()
Marks the pooled object as abandoned.
voidmarkReturning()
Marks the object as returning to the pool.
voidprintStackTrace(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.
voidsetLogAbandoned(boolean logAbandoned)
Is abandoned object tracking being used?
booleanstartEvictionTest()
Attempt to place the pooled object in the PooledObjectState#EVICTION state.
voiduse()
Record the current stack trace as the last time the object was used.