T - the type of objects managed by the object poolpublic interface ObjectPoolListener<T>
| Modifier and Type | Method and Description |
|---|---|
void |
objectCheckedIn(T object,
CallerTrace checkOutTrace,
CallerTrace checkInTrace,
PoolStats poolStats)
Called after an object was checked into the pool.
|
void |
objectCheckedOut(T object,
CallerTrace checkOutTrace,
PoolStats poolStats)
Called after an object was checked out from the pool.
|
void |
objectCreated(T object,
int objectCount)
Called after an object was created by the pool.
|
void |
objectDestroyed(T object,
int objectCount,
java.lang.Exception ex)
Called after an object was destroyed by the pool.
|
void |
objectReclaimed(T object,
ReclaimAction reclaimAction,
CallerTrace checkOutTrace)
Called after the reclaiming of an object was triggered.
|
void objectCreated(T object, int objectCount)
object - the created objectobjectCount - the new number of objects managed by the poolvoid objectCheckedOut(T object, CallerTrace checkOutTrace, PoolStats poolStats)
object - the checked out objectcheckOutTrace - the caller trace of the burrower; may be null
if the pool does not record itpoolStats - the current stats of the poolvoid objectCheckedIn(T object, CallerTrace checkOutTrace, CallerTrace checkInTrace, PoolStats poolStats)
object - the checked in objectcheckOutTrace - the caller trace of the original (!!) burrower, not
the one who returned it; may be null if the pool does not
record itcheckInTrace - the caller trace of the check-in of the objectpoolStats - the current stats of the poolvoid objectReclaimed(T object, ReclaimAction reclaimAction, CallerTrace checkOutTrace)
object - the reclaimed object (see the ReclaimAction)reclaimAction - what was done exactly (depends on the pool's
configuration)checkOutTrace - the caller trace of the burrower; may be null
if the pool does not record itvoid objectDestroyed(T object, int objectCount, java.lang.Exception ex)
object - the destroyed objectobjectCount - the remaining number of objects managed by the poolex - the exception if one was encountered in the process of the
destroying the object