Esempio n. 1
0
 /**
  * addLocationInput
  *
  * @param Riak\Location $location
  *
  * @return $this
  */
 public function addLocationInput(Riak\Location $location)
 {
     // default bucket type cannot be passed to the MR api due to a bug
     if ($location->getBucket()->getType() == 'default') {
         $input = [$location->getBucket()->getName(), $location->getKey()];
     } else {
         $input = [$location->getBucket()->getName(), $location->getKey(), '', $location->getBucket()->getType()];
     }
     $this->inputs[] = $input;
     return $this;
 }
Esempio n. 2
0
 /**
  * @param Pb\Message\RpbGetReq|Pb\Message\RpbPutReq|\ProtobufMessage $message
  * @param Location|null $location
  */
 protected function setLocationOnMessage(\ProtobufMessage &$message, Location $location = null)
 {
     if (!empty($location)) {
         $message->setKey($location->getKey());
     }
 }