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.