Package net.spy.memcached.internal
Interface GenericCompletionListener<F extends java.util.concurrent.Future<?>>
-
- All Superinterfaces:
java.util.EventListener
- All Known Subinterfaces:
BulkGetCompletionListener
,GetCompletionListener
,OperationCompletionListener
public interface GenericCompletionListener<F extends java.util.concurrent.Future<?>> extends java.util.EventListener
A generic listener that will be notified once the future completes.While this listener can be used directly, it is advised to subclass it to make it easier for the API user to work with. See the
OperationCompletionListener
as an example.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onComplete(F future)
This method will be executed once the future completes.
-
-
-
Method Detail
-
onComplete
void onComplete(F future) throws java.lang.Exception
This method will be executed once the future completes.Completion includes both failure and success, so it is advised to always check the status and errors of the future.
- Parameters:
future
- the future that got completed.- Throws:
java.lang.Exception
- can potentially throw anything in the callback.
-
-