ObjectPool
interface ObjectPool
Methods
Get an object from the object pool.
Release an object back to the object pool.
Destroy a checked-out object instead of returning it to the pool.
Destroy idle objects that exceed the maximum lifetime.
Destroy idle objects past the maximum idle time down to the retention floor.
Close the pool and destroy all idle objects.
Determine if the pool is closed.
Determine if the entire pool has exceeded its idle TTL.
Return the number of objects currently checked out.
Return the current number of objects managed by the pool.
Return the number of objects currently available in the pool.
Get the normalized pool options.
Return statistics about the pool's current state.
Details
at line 14
object
get()
Get an object from the object pool.
at line 19
void
release(object $object)
Release an object back to the object pool.
at line 24
void
discard(object $object)
Destroy a checked-out object instead of returning it to the pool.
at line 29
void
sweepExpired()
Destroy idle objects that exceed the maximum lifetime.
at line 34
void
trimIdle()
Destroy idle objects past the maximum idle time down to the retention floor.
at line 39
void
close()
Close the pool and destroy all idle objects.
at line 44
bool
isClosed()
Determine if the pool is closed.
at line 49
bool
isIdle()
Determine if the entire pool has exceeded its idle TTL.
at line 54
int
getBorrowedObjectNumber()
Return the number of objects currently checked out.
at line 59
int
getCurrentObjectNumber()
Return the current number of objects managed by the pool.
at line 64
int
getObjectNumberInPool()
Return the number of objects currently available in the pool.
at line 69
PoolOptions
getOptions()
Get the normalized pool options.
at line 76
array
getStats()
Return statistics about the pool's current state.