Sometimes, applications perform operations on a database that doesn't need to wait until it is completed for further processing. Such operations will optimize resources in terms of CPU and disk I/O. Instead of holding the current thread and waiting for the response of that database queries, it proceeds further. Such asynchronous operations are allowed to use using Couchbase SDK. Let me show you a sample code and explain more about this:
AsyncBucket aBucket = theBucket.async(); aBucket.get("2007").map(new Func1<JsonDocument, String>() { public String call(JsonDocument jsonDocument) { jsonDocument.content().put("name"," Mr " + jsonDocument.content().getString("name")); return jsonDocument.content().getString("name"); } }).subscribe(new Action1<String>() { public void call(String name) { System.out.println(" Async Call...