프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$config | |||
$createFunction | |||
$failureCount | |||
$idlePool | SplQueue | ||
$poolSize | integer | 连接池的尺寸,最大连接数 | |
$resourceNum | |||
$resourcePool | array | idle connection | |
$taskQueue | SplQueue |
메소드 | 설명 | |
---|---|---|
__construct ( array $config = [], integer $poolSize = 100 ) | ||
create ( $callback ) | ||
failure ( ) | 失败计数 | |
getConfig ( ) : array | ||
join ( $resource ) | 加入到连接池中 | |
release ( $resource ) | 释放资源 | |
remove ( $resource ) : boolean | 移除资源 | |
request ( callable $callback ) : boolean | 请求资源 | |
setPoolSize ( $newSize ) | 修改连接池尺寸 |
메소드 | 설명 | |
---|---|---|
doTask ( ) |
public __construct ( array $config = [], integer $poolSize = 100 ) | ||
$config | array | |
$poolSize | integer |