PHP Class PHPDaemon\Clients\Redis\Pool

Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Network\Client
Show file Open project: kakserpom/phpdaemon Class Usage Examples

Public Properties

Property Type Description
$servConnSub Connection[]

Protected Properties

Property Type Description
$currentMasterAddr

Public Methods

Method Description
__call ( $cmd, array $args ) : void Magic __call Example: $redis->lpush('mylist', microtime(true));
autoscan ( string $cmd, array $args = [], cllable $cbEnd = null, integer $limit = null ) : AutoScan Wrapper for scans commands
getLocalSubscribersCount ( string $chan ) : integer
lock ( string $key, integer $timeout ) : Lock
meval ( callable $cb = null ) : MultiEval Easy wrapper for queue of eval's

Protected Methods

Method Description
getConfigDefaults ( ) : array | boolean Setting default config options Overriden from NetworkClient::getConfigDefaults
sendCommand ( string $addr, string $cmd, array $args, callable $cb ) : void
sendSubCommand ( string $cmd, array $args, callable $cb ) : boolean

Method Details

__call() public method

Magic __call Example: $redis->lpush('mylist', microtime(true));
public __call ( $cmd, array $args ) : void
$args array Arguments
return void

autoscan() public method

Wrapper for scans commands
public autoscan ( string $cmd, array $args = [], cllable $cbEnd = null, integer $limit = null ) : AutoScan
$cmd string Command
$args array Arguments
$cbEnd cllable Callback
$limit integer Limit
return AutoScan

getConfigDefaults() protected method

Setting default config options Overriden from NetworkClient::getConfigDefaults
protected getConfigDefaults ( ) : array | boolean
return array | boolean

getLocalSubscribersCount() public method

public getLocalSubscribersCount ( string $chan ) : integer
$chan string
return integer

lock() public method

public lock ( string $key, integer $timeout ) : Lock
$key string
$timeout integer
return Lock

meval() public method

Easy wrapper for queue of eval's
public meval ( callable $cb = null ) : MultiEval
$cb callable
return MultiEval

sendCommand() protected method

protected sendCommand ( string $addr, string $cmd, array $args, callable $cb ) : void
$addr string
$cmd string
$args array
$cb callable
return void

sendSubCommand() protected method

protected sendSubCommand ( string $cmd, array $args, callable $cb ) : boolean
$cmd string
$args array
$cb callable
return boolean

Property Details

$currentMasterAddr protected property

protected $currentMasterAddr

$servConnSub public property

public Connection[],PHPDaemon\Clients\Redis $servConnSub
return Connection[]