These methods are named in a similar fashion to their blocking counterparts, with "Async" appended. E.g., Cache.putAsync(), Cache.removeAsync(), etc. These asynchronous counterparts return a Future containing the actual result of the operation.
For example, in a cache paramerized as Cache<String, String>, Cache.put(String key, String value) returns a String. Cache.putAsync(String key, String value) would return a Future<String>.
Non-blocking APIs are powerful in that they provide all of the guarantees of synchronous communications - with the ability to handle communication failures and exceptions - with the ease of not having to block until a call completes. This allows you to better harness parallelism in your system. For example:
There are 4 things in Infinispan that can be considered to be on the critical path of a typical write operation. These are, in terms of cost, network calls, marshalling, writing to a cache store (optional), and locking. As of Infinispan 4.0, using the async methods will take the network calls and marshalling off the critical path. For various technical reasons, writing to a cache store and acquiring locks, however, still happens in the caller's thread. In future, we plan to take these offline as well. See this developer mail list thread about this topic.
Strictly, these methods do not return JDK Futures, but rather a sub-interface known as a NotifyingFuture. The main difference is that you can attach a listener to a NotifyingFuture such that you could be notified when the future completes. Here is an example of making use of a notifying future: