| API Call | $object->cas($casunique, $key, $value [, $expiry ]) | ||
| Asynchronous | no | ||
| Description | Compare and set a value providing the supplied CAS key matches | ||
| Returns | boolean; supported values: | ||
COUCHBASE_E2BIG | The Object is too big to be stored on the server | ||
COUCHBASE_ENOMEM | Out of Resources | ||
COUCHBASE_ETMPFAIL | Temporary failure; try the operation again | ||
COUCHBASE_KEY_EEXISTS | The key exists, but the supplied CAS ID did not match the one for the object in the cluster | ||
COUCHBASE_KEY_ENOENT | Requested document ID does not exist | ||
COUCHBASE_NOT_MY_VBUCKET | The command was sent to the wrong server; may be triggered during a rebalance or failover operation. Retry the operation | ||
COUCHBASE_NOT_STORED | The object was not stored | ||
COUCHBASE_SUCCESS | Operation succeeded | ||
| Arguments | |||
$casunique | Unique value used to verify a key/value combination | ||
string $key | Document ID used to identify the value | ||
object $value | Value to be stored | ||
$expiry | Expiry time for key. Values larger than 30*24*60*60 seconds (30 days) are interpreted as absolute times (from the epoch). | ||
| Errors | |||
CouchbaseAuthenticationException | Authentication to the Couchbase cluster failed | ||
CouchbaseException | Base exception class for all Couchbase exceptions | ||
CouchbaseIllegalKeyException | The key provided is not a legal key identifier | ||
CouchbaseLibcouchbaseException | An error occurred within the libcouchbase library used by th PHP extension | ||
CouchbaseServerException | An error occurred within the Couchbase cluster | ||
| API Call | $object->getAndLock($key [, $casarray ] [, $getl-expiry ]) | ||
| Asynchronous | no | ||
| Description | Get the value for a key, lock the key from changes | ||
| Returns | scalar; supported values: | ||
COUCHBASE_ETMPFAIL | Temporary failure; try the operation again | ||
COUCHBASE_KEY_ENOENT | Requested document ID does not exist | ||
COUCHBASE_NOT_MY_VBUCKET | The command was sent to the wrong server; may be triggered during a rebalance or failover operation. Retry the operation | ||
object | Requested object | ||
| Arguments | |||
string $key | Document ID used to identify the value | ||
array $casarray | Array of unique values used to verify a key/value combination | ||
$getl-expiry | Expiry time for lock | ||
| Errors | |||
CouchbaseAuthenticationException | Authentication to the Couchbase cluster failed | ||
CouchbaseException | Base exception class for all Couchbase exceptions | ||
CouchbaseIllegalKeyException | The key provided is not a legal key identifier | ||
CouchbaseLibcouchbaseException | An error occurred within the libcouchbase library used by th PHP extension | ||
CouchbaseServerException | An error occurred within the Couchbase cluster | ||
| API Call | $object->getAndLockMulti($keycollection [, $casarray ] [, $getl-expiry ]) | ||
| Asynchronous | no | ||
| Description | Get the value for a key, lock the key from changes | ||
| Returns | array (
Array of key/value pairs for each document, or key/error condition for each failure
) | ||
| Arguments | |||
array $keycollection | One or more keys used to reference a value | ||
array $casarray | Array of unique values used to verify a key/value combination | ||
$getl-expiry | Expiry time for lock | ||
| Errors | |||
CouchbaseAuthenticationException | Authentication to the Couchbase cluster failed | ||
CouchbaseException | Base exception class for all Couchbase exceptions | ||
CouchbaseIllegalKeyException | The key provided is not a legal key identifier | ||
CouchbaseLibcouchbaseException | An error occurred within the libcouchbase library used by th PHP extension | ||
CouchbaseServerException | An error occurred within the Couchbase cluster | ||
| API Call | $object->unlock($key, $casunique) | ||
| Asynchronous | no | ||
| Description | Unlock a previously locked key by providing the corresponding CAS value that was returned during the lock | ||
| Returns | boolean; supported values: | ||
COUCHBASE_KEY_ENOENT | Requested document ID does not exist | ||
COUCHBASE_SUCCESS | Operation succeeded | ||
| Arguments | |||
string $key | Document ID used to identify the value | ||
$casunique | Unique value used to verify a key/value combination | ||
| Errors | |||
CouchbaseAuthenticationException | Authentication to the Couchbase cluster failed | ||
CouchbaseException | Base exception class for all Couchbase exceptions | ||
CouchbaseIllegalKeyException | The key provided is not a legal key identifier | ||
CouchbaseLibcouchbaseException | An error occurred within the libcouchbase library used by th PHP extension | ||
CouchbaseServerException | An error occurred within the Couchbase cluster | ||