| API Call | $object->observe($key, $casunique, $observedetails) | ||
| Asynchronous | no | ||
| Description | Get the durability of a document | ||
| Returns | boolean; 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 | ||
COUCHBASE_SUCCESS | Operation succeeded | ||
| Arguments | |||
string $key | Document ID used to identify the value | ||
$casunique | Unique value used to verify a key/value combination | ||
array $observedetails | List of returned observe details | ||
| 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->observeMulti($keycollection, $observedetails) | ||
| Asynchronous | no | ||
| Description | Get the durability of a document | ||
| Returns | scalar; supported values: | ||
COUCHBASE_ETMPFAIL | Temporary failure; try the operation again | ||
COUCHBASE_NOT_MY_VBUCKET | The command was sent to the wrong server; may be triggered during a rebalance or failover operation. Retry the operation | ||
array | Array of result state for each requested document | ||
| Arguments | |||
array $keycollection | One or more keys used to reference a value | ||
array $observedetails | List of returned observe details | ||
| 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 | ||
The durability functions enable you to specify the durability parameters of one or more keys. The values should be specified as an associative array of the following values:
| Name | Description |
|---|---|
persist_to | The number of nodes the document should be persisted to |
replicate_to | The number of nodes the document should be replicated to |
timeout | The max time in milliseconds to wait for durability |
interval | The interval between each poll request |
| API Call | $object->keyDurability($key, $casunique, $durability) | ||
| Asynchronous | no | ||
| Description | Wait until the durability of a document has been reached | ||
| Returns | boolean; 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 | ||
COUCHBASE_SUCCESS | Operation succeeded | ||
| Arguments | |||
string $key | Document ID used to identify the value | ||
$casunique | Unique value used to verify a key/value combination | ||
array $durability | List of required durability values | ||
| 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->keyDurabilityMulti($keycollection, $durability) | ||
| Asynchronous | no | ||
| Description | Wait until the durability of a document has been reached | ||
| 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 | ||
array | Array of result state for each requested document | ||
| Arguments | |||
array $keycollection | One or more keys used to reference a value | ||
array $durability | List of required durability values | ||
| 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 | ||