interface ObjectPool

Methods

object
get()

Get an object from the object pool.

void
release(object $object)

Release an object back to the object pool.

void
discard(object $object)

Destroy a checked-out object instead of returning it to the pool.

void
sweepExpired()

Destroy idle objects that exceed the maximum lifetime.

void
trimIdle()

Destroy idle objects past the maximum idle time down to the retention floor.

void
close()

Close the pool and destroy all idle objects.

bool
isClosed()

Determine if the pool is closed.

bool
isIdle()

Determine if the entire pool has exceeded its idle TTL.

int
getBorrowedObjectNumber()

Return the number of objects currently checked out.

int
getCurrentObjectNumber()

Return the current number of objects managed by the pool.

int
getObjectNumberInPool()

Return the number of objects currently available in the pool.

getOptions()

Get the normalized pool options.

array
getStats()

Return statistics about the pool's current state.

Details

at line 14
object get()

Get an object from the object pool.

Return Value

object

at line 19
void release(object $object)

Release an object back to the object pool.

Parameters

object $object

Return Value

void

at line 24
void discard(object $object)

Destroy a checked-out object instead of returning it to the pool.

Parameters

object $object

Return Value

void

at line 29
void sweepExpired()

Destroy idle objects that exceed the maximum lifetime.

Return Value

void

at line 34
void trimIdle()

Destroy idle objects past the maximum idle time down to the retention floor.

Return Value

void

at line 39
void close()

Close the pool and destroy all idle objects.

Return Value

void

at line 44
bool isClosed()

Determine if the pool is closed.

Return Value

bool

at line 49
bool isIdle()

Determine if the entire pool has exceeded its idle TTL.

Return Value

bool

at line 54
int getBorrowedObjectNumber()

Return the number of objects currently checked out.

Return Value

int

at line 59
int getCurrentObjectNumber()

Return the current number of objects managed by the pool.

Return Value

int

at line 64
int getObjectNumberInPool()

Return the number of objects currently available in the pool.

Return Value

int

at line 69
PoolOptions getOptions()

Get the normalized pool options.

Return Value

PoolOptions

at line 76
array getStats()

Return statistics about the pool's current state.

Return Value

array