Package net.spy.memcached.internal
Interface GenericCompletionListener<F extends Future<?>>
- All Superinterfaces:
EventListener
- All Known Subinterfaces:
BulkGetCompletionListener
,GetCompletionListener
,OperationCompletionListener
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
Modifier and TypeMethodDescriptionvoid
onComplete
(F future) This method will be executed once the future completes.
-
Method Details
-
onComplete
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:
Exception
- can potentially throw anything in the callback.
-