Exemplo n.º 1
0
 /**
  * alist sized insert.
  * @param key   (string)
  * @param size  (int)
  * @param value (string)
  * @return status
  */
 public function alist_sized_insert($key, $size, $value)
 {
     $result = rmc_alist_sized_insert($key, $size, $value);
     return $result == RomaClient::STORED ? True : False;
 }
Exemplo n.º 2
0
 /**
  * @brief ALIST operation. (Issue 'alist_sized_insert' command)
  * @param key
  * @param size
  * @param value
  * @return Returns True if success.
  */
 public function alist_sized_insert($key, $size, $value)
 {
     $result = rmc_alist_sized_insert($this->client_id, $key, $size, $value, $this->default_timeout);
     if (is_null($result) || $result == RomaClient::RMC_RET_EXCEPTION) {
         throw new Exception("rmc_alist_sized_insert() failure");
     } else {
         if ($result == RomaClient::RMC_RET_ERROR) {
             return False;
         }
     }
     return True;
 }