On 5 Jan 2011, at 17:05, Vladimir Blagojevic wrote:

Or, perhaps, making use of a more fluent API:

R result = new MapReduceTask(cache).on(K...).mappedWith(mapper).reducedWith(reducer).collate(collator);

Future<R>  result = new MapReduceTask(cache).on(K...).mappedWith(mapper).reducedWith(reducer).collateAsynchronously(collator);

List<R>  result = new DistributedRemoteTask(cache).on(K...).execute(distributedCallable);

List<Future<R>>  result = new DistributedRemoteTask(cache).on(K...).executeAsync(distributedCallable);




Awesome! I love this fluent API proposal!


Cool.  Then if this is the case lets stick with the fluent API - I think it would make life much easier for developers.

--
Manik Surtani
manik@jboss.org
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org