\Imi\Pool\InterfacesIPool

池子接口

Summary

Methods
Constants
getName()
getConfig()
open()
close()
getResource()
tryGetResource()
release()
gc()
fillMinResources()
getCount()
getFree()
getUsed()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getName()

getName() : string

获取池子名称

Returns

string

open()

open() : void

打开池子

close()

close() : void

关闭池子,释放所有资源

tryGetResource()

tryGetResource() : \Imi\Pool\Interfaces\IPoolResource|boolean

尝试获取资源,获取到则返回资源,没有获取到返回false

Returns

\Imi\Pool\Interfaces\IPoolResource|boolean

gc()

gc() : void

资源回收

fillMinResources()

fillMinResources() : void

填充最少资源数量

getCount()

getCount() : integer

获取当前池子中资源总数

Returns

integer

getFree()

getFree() : integer

获取当前池子中空闲资源总数

Returns

integer

getUsed()

getUsed() : integer

获取当前池子中正在使用的资源总数

Returns

integer