DESCRIPTION

SPY-132: 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.

Change-Id: I516af74918e57521542a0bad2ff7142b75ab7b13


COMMENTS

author: Natasha Sullivan
date: 2013-08-14 12:18:40.394000000

Uploaded patch set 10.

-------------------------------------
author: Andreas Short
date: 2013-08-30 08:34:45.079000000

Patch Set 10: Code-Review+2

(6 comments)

Excellent patchset.  I was tempted to -1 for the way the number of threads is handled, but I decided that's not that important here.  What you have is reasonable.  

If you want to improve it, I did drop in a few places.

Also, most of the new files shoudln't have Noah Dean in them.

Line:2, src/main/java/net/spy/memcached/internal/BulkGetCompletionListener.java -> no Noah Dean needed.

Line:11, /COMMIT_MSG -> Why 2 threads?  

I may have done 2 per CPU or something like that.

Line:42, src/test/java/net/spy/memcached/internal/ListenableFutureTest.java -> might be nice to create this one the same way.

Line:2077, src/main/java/net/spy/memcached/MemcachedClient.java -> Ugh.  Passing that thing around a lot, but I don't see another way for it.  Well, you may be able to send it over to the operation factory, then it's included from there?  I'm okay with this though.

Line:88, src/main/java/net/spy/memcached/ConnectionFactory.java -> Another interface addition, so more reason for a minor.

Line:114, src/main/java/net/spy/memcached/DefaultConnectionFactory.java -> A constant right here?

-------------------------------------
author: Natasha Sullivan
date: 2013-08-30 10:28:43.964000000

Patch Set 10:

(1 comment)

Line:2077, src/main/java/net/spy/memcached/MemcachedClient.java -> the problem is that its not passed to the operation factory, but every future needs it.. we'd need a future factory if we want to go down that route, but I dont think its necessary right now.. we also pass the operationTimeout around for every one.

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