The delete() method deletes an item in
the database with the specified key. Delete operations are
synchronous only.
| API Call | client.delete(key) | ||
| Asynchronous | yes | ||
| Description | Delete a key/value | ||
| Returns | OperationFuture<Boolean> (
Asynchronous request value, as Boolean
) | ||
| Arguments | |||
String key | Document ID used to identify the value | ||
For example, to delete an item you might use code similar to the following:
Future<Boolean> success = membase.delete("samplekey"); try { if (success.get()) { System.out.printf("Delete succeeded\n"); } else { System.out.printf("Delete failed\n"); } } catch (Exception e) { System.out.println("Failed to delete " + e); }