PHP Class Predis\Connection\Aggregate\PredisCluster

Author: Daniele Alessandri ([email protected])
Inheritance: implements ClusterInterface, implements IteratorAggregate, implements Countable
Show file Open project: tillkruss/redis-object-cache Class Usage Examples

Public Methods

Method Description
__construct ( Predis\Cluster\StrategyInterface $strategy = null )
add ( Predis\Connection\NodeConnectionInterface $connection )
connect ( )
count ( )
disconnect ( )
executeCommand ( Predis\Command\CommandInterface $command )
executeCommandOnNodes ( Predis\Command\CommandInterface $command ) : array Executes the specified Redis command on all the nodes of a cluster.
getClusterStrategy ( ) : Predis\Cluster\StrategyInterface Returns the underlying command hash strategy used to hash commands by using keys found in their arguments.
getConnection ( Predis\Command\CommandInterface $command )
getConnectionById ( $connectionID )
getConnectionByKey ( string $key ) : Predis\Connection\NodeConnectionInterface Retrieves a connection instance from the cluster using a key.
getIterator ( )
isConnected ( )
readResponse ( Predis\Command\CommandInterface $command )
remove ( Predis\Connection\NodeConnectionInterface $connection )
removeById ( string $connectionID ) : boolean Removes a connection instance using its alias or index.
writeRequest ( Predis\Command\CommandInterface $command )

Method Details

__construct() public method

public __construct ( Predis\Cluster\StrategyInterface $strategy = null )
$strategy Predis\Cluster\StrategyInterface Optional cluster strategy.

add() public method

public add ( Predis\Connection\NodeConnectionInterface $connection )
$connection Predis\Connection\NodeConnectionInterface

connect() public method

public connect ( )

count() public method

public count ( )

disconnect() public method

public disconnect ( )

executeCommand() public method

public executeCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface

executeCommandOnNodes() public method

Executes the specified Redis command on all the nodes of a cluster.
public executeCommandOnNodes ( Predis\Command\CommandInterface $command ) : array
$command Predis\Command\CommandInterface A Redis command.
return array

getClusterStrategy() public method

Returns the underlying command hash strategy used to hash commands by using keys found in their arguments.
public getClusterStrategy ( ) : Predis\Cluster\StrategyInterface
return Predis\Cluster\StrategyInterface

getConnection() public method

public getConnection ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface

getConnectionById() public method

public getConnectionById ( $connectionID )

getConnectionByKey() public method

Retrieves a connection instance from the cluster using a key.
public getConnectionByKey ( string $key ) : Predis\Connection\NodeConnectionInterface
$key string Key string.
return Predis\Connection\NodeConnectionInterface

getIterator() public method

public getIterator ( )

isConnected() public method

public isConnected ( )

readResponse() public method

public readResponse ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface

remove() public method

public remove ( Predis\Connection\NodeConnectionInterface $connection )
$connection Predis\Connection\NodeConnectionInterface

removeById() public method

Removes a connection instance using its alias or index.
public removeById ( string $connectionID ) : boolean
$connectionID string Alias or index of a connection.
return boolean Returns true if the connection was in the pool.

writeRequest() public method

public writeRequest ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface