PHP Class Kraken\Channel\Model\Zmq\Connection\ConnectionPool

Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$connectionPool mixed[]
$heartbeatOffset float
$keepaliveOffset float
$now callable

Public Methods

Method Description
__construct ( float $offset = 3600000, $heartbeat = 200 )
__destruct ( )
erase ( )
existsConnection ( string $id ) : boolean
getConnected ( ) : string[]
getConnection ( string $id ) : mixed[]
getNow ( ) : float
isHeartbeatNeeded ( string $id ) : boolean
registerHeartbeat ( $id ) : boolean
removeConnection ( string $id ) : boolean
removeInvalid ( ) : string[]
resetNow ( )
setConnection ( string $id ) : boolean
setConnectionProperty ( string $id, string $property, mixed $value )
setNow ( callable $callback )
validateConnection ( string $id ) : boolean

Protected Methods

Method Description
generateConst ( ) : mixed[]
register ( array $current = [] ) : mixed[]
validateIn ( mixed[] $const, mixed[] $data ) : boolean
validateOut ( mixed[] $const, mixed[] $data ) : boolean

Method Details

__construct() public method

public __construct ( float $offset = 3600000, $heartbeat = 200 )
$offset float

__destruct() public method

public __destruct ( )

erase() public method

public erase ( )

existsConnection() public method

public existsConnection ( string $id ) : boolean
$id string
return boolean

generateConst() protected method

protected generateConst ( ) : mixed[]
return mixed[]

getConnected() public method

public getConnected ( ) : string[]
return string[]

getConnection() public method

public getConnection ( string $id ) : mixed[]
$id string
return mixed[]

getNow() public method

public getNow ( ) : float
return float

isHeartbeatNeeded() public method

public isHeartbeatNeeded ( string $id ) : boolean
$id string
return boolean

register() protected method

protected register ( array $current = [] ) : mixed[]
$current array
return mixed[]

registerHeartbeat() public method

public registerHeartbeat ( $id ) : boolean
$id
return boolean

removeConnection() public method

public removeConnection ( string $id ) : boolean
$id string
return boolean

removeInvalid() public method

public removeInvalid ( ) : string[]
return string[]

resetNow() public method

public resetNow ( )

setConnection() public method

public setConnection ( string $id ) : boolean
$id string
return boolean

setConnectionProperty() public method

public setConnectionProperty ( string $id, string $property, mixed $value )
$id string
$property string
$value mixed

setNow() public method

public setNow ( callable $callback )
$callback callable

validateConnection() public method

public validateConnection ( string $id ) : boolean
$id string
return boolean

validateIn() protected method

protected validateIn ( mixed[] $const, mixed[] $data ) : boolean
$const mixed[]
$data mixed[]
return boolean

validateOut() protected method

protected validateOut ( mixed[] $const, mixed[] $data ) : boolean
$const mixed[]
$data mixed[]
return boolean

Property Details

$connectionPool protected property

protected mixed[] $connectionPool
return mixed[]

$heartbeatOffset protected property

protected float $heartbeatOffset
return float

$keepaliveOffset protected property

protected float $keepaliveOffset
return float

$now protected property

protected callable $now
return callable