mirror of
https://github.com/predis/predis.git
synced 2026-10-10 13:57:22 +00:00
Make cluster and replication classes extend from a common interface.
This commit is contained in:
@@ -18,39 +18,8 @@ use Predis\Command\CommandInterface;
|
||||
*
|
||||
* @author Daniele Alessandri <suppakilla@gmail.com>
|
||||
*/
|
||||
interface ReplicationConnectionInterface extends ConnectionInterface
|
||||
interface ReplicationConnectionInterface extends AggregatedConnectionInterface
|
||||
{
|
||||
/**
|
||||
* Adds a connection instance to the cluster.
|
||||
*
|
||||
* @param SingleConnectionInterface $connection Instance of a connection.
|
||||
*/
|
||||
public function add(SingleConnectionInterface $connection);
|
||||
|
||||
/**
|
||||
* Removes the specified connection instance from the cluster.
|
||||
*
|
||||
* @param SingleConnectionInterface $connection Instance of a connection.
|
||||
* @return Boolean Returns true if the connection was in the pool.
|
||||
*/
|
||||
public function remove(SingleConnectionInterface $connection);
|
||||
|
||||
/**
|
||||
* Gets the actual connection instance in charge of the specified command.
|
||||
*
|
||||
* @param CommandInterface $command Instance of a Redis command.
|
||||
* @return SingleConnectionInterface
|
||||
*/
|
||||
public function getConnection(CommandInterface $command);
|
||||
|
||||
/**
|
||||
* Retrieves a connection instance from the cluster using an alias.
|
||||
*
|
||||
* @param string $connectionId Alias of a connection
|
||||
* @return SingleConnectionInterface
|
||||
*/
|
||||
public function getConnectionById($connectionId);
|
||||
|
||||
/**
|
||||
* Switches the internal connection object being used.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user