Search:

Search all manuals
Search this manual
Manual
Membase Client Library: Java
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
2 Membase Client Library: Java Method Summary
Chapter Sections
Chapters

2.1. Synchronous Method Calls

The Java Client Library supports the core Membase API methods as direct calls to the Membase server through the API call. These direct methods can be used to provide instant storage, retrieval and updating of Membase key/value pairs.

For example, the following fragment stores and retrieves a single key/value pair:

membase.set("someKey", 3600, someObject);

Object myObject = membase.get("someKey");

In the example code above, the client will wait until a response has been received from one of the configured Membase servers before returning the required value or an exception.