lukeddy / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Callbacks on Futures #277

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great if Future objects provided by spymemcached allows callbacks 
registration to be notified when they are completed. It would be pretty useful 
to avoid blocking threads waiting for an answer.

It could be something like :

client.asyncGet("myKey").onComplete(new CompleteCallback<GetFuture<Object>>() {
    public void complete(GetFuture<Object> future) {
        // do something useful with future.get() as it should not block here
    }
});

Original issue reported on code.google.com by mathieu.ancelin on 24 May 2013 at 9:23

GoogleCodeExporter commented 9 years ago
It could be something like : 

https://github.com/mathieuancelin/java-memcached-client/commit/6d50daf05f128c127
0fa4efb39f0470b477490e2

Original comment by mathieu.ancelin on 24 May 2013 at 10:04