# \PG\MSF\PoolsIAsynPool

Interface IAsynPool

## Summary

Methods
Constants
getAsynName()
distribute()
execute()
serverInit()
workerInit()
pushToPool()
prepareOne()
addTokenCallback()
getSync()
No constants found
No protected methods found
N/A
No private methods found
N/A

File
  Pools/IAsynPool.php
Package
  \PG\MSF\Pools

## Tags

None found

## Methods

### getAsynName()

    getAsynName() : string

返回唯一的连接池名称

#### Returns

string

#

## Tags

None found

### distribute()

    distribute(array  $data) : $this

分发消息

#### Parameters

array | $data | 待分发数据

#### Returns

$this

#

## Tags

None found

### execute()

    execute(array  $data)

执行命令

#### Parameters

array | $data | 命令相关信息

#

## Tags

None found

### serverInit()

    serverInit(\PG\MSF\MSFServer  $swooleServer, \PG\MSF\Pools\AsynPoolManager  $asynManager) : $this

初始化

#### Parameters

\PG\MSF\MSFServer | $swooleServer | Server实例
\PG\MSF\Pools\AsynPoolManager | $asynManager | 异步连接池管理器

#### Returns

$this

#

## Tags

None found

### workerInit()

    workerInit(integer  $workerId) : $this

初始化workerId

#### Parameters

integer | $workerId | worker进程ID

#### Returns

$this

#

## Tags

None found

### pushToPool()

    pushToPool(mixed  $client) : $this

归还连接

#### Parameters

mixed | $client | 连接对象

#### Returns

$this

#

## Tags

None found

### prepareOne()

    prepareOne()

创建连接

#

## Tags

None found

### addTokenCallback()

    addTokenCallback(callable  $callback) : integer

注册回调

#### Parameters

callable | $callback | 回调函数

#### Returns

integer

#

## Tags

None found

### getSync()

    getSync() : mixed

获取同步连接

#### Throws

\Exception

#### Returns

mixed

#

## Tags

None found

### IAsynPool.php