mirror of
https://github.com/predis/predis.git
synced 2026-08-23 21:49:40 +00:00
Rename method "enableAutoSlotsMap()" to "useClusterSlots()".
This commit is contained in:
@@ -49,7 +49,7 @@ use Predis\Response\ErrorInterface as ErrorResponseInterface;
|
||||
*/
|
||||
class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
|
||||
{
|
||||
private $askSlotsMap = true;
|
||||
private $useClusterSlots = true;
|
||||
private $defaultParameters = array();
|
||||
private $pool = array();
|
||||
private $slots = array();
|
||||
@@ -409,7 +409,7 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
|
||||
$connection = $this->createConnection($connectionID);
|
||||
}
|
||||
|
||||
if ($this->askSlotsMap) {
|
||||
if ($this->useClusterSlots) {
|
||||
$this->askSlotsMap($connection);
|
||||
}
|
||||
|
||||
@@ -523,9 +523,9 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
|
||||
*
|
||||
* @param bool $value Enable or disable the use of CLUSTER SLOTS.
|
||||
*/
|
||||
public function enableAutoSlotsMap($value)
|
||||
public function useClusterSlots($value)
|
||||
{
|
||||
$this->askSlotsMap = (bool) $value;
|
||||
$this->useClusterSlots = (bool) $value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -422,7 +422,7 @@ class RedisClusterTest extends PredisTestCase
|
||||
$connection2->expects($this->never())->method('writeRequest');
|
||||
|
||||
$cluster = new RedisCluster();
|
||||
$cluster->enableAutoSlotsMap(false);
|
||||
$cluster->useClusterSlots(false);
|
||||
$cluster->add($connection1);
|
||||
$cluster->add($connection2);
|
||||
|
||||
@@ -443,7 +443,7 @@ class RedisClusterTest extends PredisTestCase
|
||||
$connection2->expects($this->once())->method('readResponse')->with($command);
|
||||
|
||||
$cluster = new RedisCluster();
|
||||
$cluster->enableAutoSlotsMap(false);
|
||||
$cluster->useClusterSlots(false);
|
||||
$cluster->add($connection1);
|
||||
$cluster->add($connection2);
|
||||
|
||||
@@ -503,7 +503,7 @@ class RedisClusterTest extends PredisTestCase
|
||||
$factory->expects($this->never())->method('create');
|
||||
|
||||
$cluster = new RedisCluster($factory);
|
||||
$cluster->enableAutoSlotsMap(false);
|
||||
$cluster->useClusterSlots(false);
|
||||
$cluster->add($connection1);
|
||||
$cluster->add($connection2);
|
||||
|
||||
@@ -547,7 +547,7 @@ class RedisClusterTest extends PredisTestCase
|
||||
->will($this->returnValue($connection3));
|
||||
|
||||
$cluster = new RedisCluster($factory);
|
||||
$cluster->enableAutoSlotsMap(false);
|
||||
$cluster->useClusterSlots(false);
|
||||
$cluster->add($connection1);
|
||||
$cluster->add($connection2);
|
||||
|
||||
@@ -581,7 +581,7 @@ class RedisClusterTest extends PredisTestCase
|
||||
$factory->expects($this->never())->method('create');
|
||||
|
||||
$cluster = new RedisCluster($factory);
|
||||
$cluster->enableAutoSlotsMap(false);
|
||||
$cluster->useClusterSlots(false);
|
||||
$cluster->add($connection1);
|
||||
$cluster->add($connection2);
|
||||
|
||||
@@ -622,7 +622,7 @@ class RedisClusterTest extends PredisTestCase
|
||||
->will($this->returnValue($connection3));
|
||||
|
||||
$cluster = new RedisCluster($factory);
|
||||
$cluster->enableAutoSlotsMap(false);
|
||||
$cluster->useClusterSlots(false);
|
||||
$cluster->add($connection1);
|
||||
$cluster->add($connection2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user