Interface GenericCompletionListener<F extends Future<?>>

All Superinterfaces:
EventListener
All Known Subinterfaces:
BulkGetCompletionListener, GetCompletionListener, OperationCompletionListener

public interface GenericCompletionListener<F extends Future<?>> extends 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

    Modifier and Type
    Method
    Description
    void
    onComplete(F future)
    This method will be executed once the future completes.
  • Method Details

    • onComplete

      void onComplete(F future) throws 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:
      Exception - can potentially throw anything in the callback.