public __construct ( Predis\Cluster\StrategyInterface $strategy = null ) | ||
$strategy | Predis\Cluster\StrategyInterface | Optional cluster strategy. |
public function __construct(StrategyInterface $strategy = null)
{
$this->pool = array();
$this->strategy = $strategy ?: new PredisStrategy();
$this->distributor = $this->strategy->getDistributor();
}
/** * Constructor * * @param null|\Predis\Cluster\Distributor\DistributorInterface $distributor */ public function __construct(DistributorInterface $distributor = null) { parent::__construct(new RandomDistributionStrategy()); }