/** * Creates the default hash strategy object. * * @return CommandHashStrategyInterface */ protected function getHashStrategy() { $distributor = new HashRing(); $hashGenerator = $distributor->getHashGenerator(); $strategy = new PredisClusterHashStrategy($hashGenerator); return $strategy; }
/** * @param mixed $nodeHashCallback Callback returning the string used to calculate the hash of a node. */ public function __construct($nodeHashCallback = null) { parent::__construct($this::DEFAULT_REPLICAS, $nodeHashCallback); }