DESCRIPTION

WIP: Adding Callbacks to Futures.

This changeset adds a onComplete callback to futures and executes
the callback in a configurable ExecutorService. By default, this
is a 2 thread fixed size thread pool, but configurable through
the Factory.

TODO:
 - Refine Interface to make it more straightforward.
 - Add callbacks to other futures (BulkFuture, BulkGetFuture,
   GetFuture, ImmediateFuture)
 - Much more testing on those futures
 - Add test to override with a custom executorService

Change-Id: I516af74918e57521542a0bad2ff7142b75ab7b13


COMMENTS

author: Natasha Sullivan
date: 2013-08-08 15:23:53.495000000

Patch Set 1:

Early feedback would be appreciated.. See the dummy tests for usage.

It also works like this currently (but may be changed a little to be easier to use):

    OperationFuture<Boolean> future = client.add("foo", "bar");

    future.addListener(new FutureListener<Boolean>() {
     xxx@xxx.xxx
      public void onComplete(final Future future) throws Exception {
        System.out.println(future.get());
      }
    });

-------------------------------------
