Example #1
0
 /**
  * {@inheritdoc}
  */
 public function getConnection(ICommand $command)
 {
     $cmdHash = $command->getHash($this->_distributor);
     if (isset($cmdHash)) {
         return $this->_distributor->get($cmdHash);
     }
     throw new ClientException(sprintf("Cannot send '%s' commands to a cluster of connections", $command->getId()));
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function getConnection(ICommand $command)
 {
     $cmdHash = $command->getHash($this->distributor);
     if (isset($cmdHash)) {
         return $this->distributor->get($cmdHash);
     }
     $message = sprintf("Cannot send '%s' commands to a cluster of connections", $command->getId());
     throw new NotSupportedException($message);
 }