示例#1
0
文件: Predis.php 项目: pietro/predis
 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());
 }
示例#2
0
文件: Predis.php 项目: awongh/cards
 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));
 }