ObjectPool
interface ObjectPool
Methods
Borrow an object from the 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 timeout.
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.
Return the number of coroutines waiting for an object.
Get the normalized pool options.
Return statistics about the pool's current state.
Details
at line 14
object
borrow()
Borrow an object from the 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
isIdleExpired()
Determine if the entire pool has exceeded its idle timeout.
at line 54
int
getBorrowedCount()
Return the number of objects currently checked out.
at line 59
int
getManagedCount()
Return the current number of objects managed by the pool.
at line 64
int
getIdleCount()
Return the number of objects currently available in the pool.
at line 69
int
getWaitingCount()
Return the number of coroutines waiting for an object.
at line 74
PoolOptions
getOptions()
Get the normalized pool options.
at line 81
array
getStats()
Return statistics about the pool's current state.