PHP Interface Predis\Cluster\StrategyInterface

This is mostly useful to support clustering via client-side sharding.
Author: Daniele Alessandri ([email protected])
Afficher le fichier Open project: tillkruss/redis-object-cache Interface Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

getDistributor() public méthode

Returns a distributor instance to be used by the cluster.
public getDistributor ( ) : Predis\Cluster\Distributor\DistributorInterface
Résultat Predis\Cluster\Distributor\DistributorInterface

getSlot() public méthode

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.
Résultat integer

getSlotByKey() public méthode

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.
Résultat integer