PHP Интерфейс Predis\Cluster\StrategyInterface

This is mostly useful to support clustering via client-side sharding.
Автор: Daniele Alessandri ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
getDistributor ( ) : Predis\Cluster\Distributor\DistributorInterface Returns a distributor instance to be used by the cluster.
getSlot ( Predis\Command\CommandInterface $command ) : integer Returns a slot for the given command used for clustering distribution or NULL when this is not possible.
getSlotByKey ( string $key ) : integer Returns a slot for the given key used for clustering distribution or NULL when this is not possible.

Описание методов

getDistributor() публичный Метод

Returns a distributor instance to be used by the cluster.
public getDistributor ( ) : Predis\Cluster\Distributor\DistributorInterface
Результат Predis\Cluster\Distributor\DistributorInterface

getSlot() публичный Метод

Returns a slot for the given command used for clustering distribution or NULL when this is not possible.
public getSlot ( Predis\Command\CommandInterface $command ) : integer
$command Predis\Command\CommandInterface Command instance.
Результат integer

getSlotByKey() публичный Метод

Returns a slot for the given key used for clustering distribution or NULL when this is not possible.
public getSlotByKey ( string $key ) : integer
$key string Key string.
Результат integer