mirror of
https://github.com/predis/predis.git
synced 2026-08-25 09:49:37 +00:00
4e6ed3f26d
This is a starting point to add a documentation of the whole set of APIs and classes of Predis. The next step will be to actually improve and extend it.
47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Predis package.
|
|
*
|
|
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Predis\Network;
|
|
|
|
use Predis\Commands\ICommand;
|
|
|
|
/**
|
|
* Defines a cluster of Redis servers formed by aggregating multiple
|
|
* connection objects.
|
|
*
|
|
* @author Daniele Alessandri <suppakilla@gmail.com>
|
|
*/
|
|
interface IConnectionCluster extends IConnection
|
|
{
|
|
/**
|
|
* Adds a connection instance to the cluster.
|
|
*
|
|
* @param IConnectionSingle $connection Instance of a connection.
|
|
*/
|
|
public function add(IConnectionSingle $connection);
|
|
|
|
/**
|
|
* Gets the actual connection instance in charge of the specified command.
|
|
*
|
|
* @param ICommand $command Instance of a Redis command.
|
|
* @return IConnectionSingle
|
|
*/
|
|
public function getConnection(ICommand $command);
|
|
|
|
/**
|
|
* Retrieves a connection instance from the cluster using an alias.
|
|
*
|
|
* @param string $connectionId Alias of a connection
|
|
* @return IConnectionSingle
|
|
*/
|
|
public function getConnectionById($connectionId);
|
|
}
|