PHP Class Predis\Connection\Cluster\PredisCluster

Author: Daniele Alessandri ([email protected])
Inheritance: implements ClusterInterface, implements IteratorAggregate, implements Countable
Mostra file Open project: nrk/predis

Public Methods

Method Description
__construct ( Predis\Cluster\StrategyInterface $strategy = null )
add ( Predis\Connection\NodeConnectionInterface $connection )
connect ( )
count ( )
disconnect ( )
executeCommand ( Predis\Command\CommandInterface $command )
getClusterStrategy ( ) : Predis\Cluster\StrategyInterface Returns the underlying command hash strategy used to hash commands by using keys found in their arguments.
getConnectionByAlias ( string $alias ) : Predis\Connection\NodeConnectionInterface | null Returns a connection instance by its alias.
getConnectionByCommand ( Predis\Command\CommandInterface $command )
getConnectionById ( $id )
getConnectionByKey ( string $key ) : Predis\Connection\NodeConnectionInterface Retrieves a connection instance from the cluster using a key.
getConnectionBySlot ( $slot ) : Predis\Connection\NodeConnectionInterface | null Retrieves a connection instance by slot.
getIterator ( )
isConnected ( )
readResponse ( Predis\Command\CommandInterface $command )
remove ( Predis\Connection\NodeConnectionInterface $connection )
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

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

getConnectionByAlias() public method

Returns a connection instance by its alias.
public getConnectionByAlias ( string $alias ) : Predis\Connection\NodeConnectionInterface | null
$alias string Connection alias.
return Predis\Connection\NodeConnectionInterface | null

getConnectionByCommand() public method

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

getConnectionById() public method

public getConnectionById ( $id )

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

getConnectionBySlot() public method

Retrieves a connection instance by slot.
public getConnectionBySlot ( $slot ) : Predis\Connection\NodeConnectionInterface | null
return Predis\Connection\NodeConnectionInterface | null

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

writeRequest() public method

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