Beispiel #1
0
 private function getConnection(Command $command)
 {
     if ($command->canBeHashed() === false) {
         throw new ClientException(sprintf("Cannot send '%s' commands to a cluster of connections.", $command->getCommandId()));
     }
     return $this->_ring->get($command->getHash());
 }
Beispiel #2
0
 public function getConnection(Command $command)
 {
     if ($command->canBeHashed() === false) {
         throw new ClientException(sprintf("Cannot send '%s' commands to a cluster of connections", $command->getCommandId()));
     }
     return $this->_distributor->get($command->getHash($this->_distributor));
 }