Class FutureCallback

  • All Implemented Interfaces:
    java.util.concurrent.Future<java.lang.Void>, Callback, Invocable
    Direct Known Subclasses:
    FutureWriteCallback

    public class FutureCallback
    extends java.lang.Object
    implements java.util.concurrent.Future<java.lang.Void>, Callback
    • Constructor Detail

      • FutureCallback

        public FutureCallback()
      • FutureCallback

        public FutureCallback​(boolean completed)
      • FutureCallback

        public FutureCallback​(java.lang.Throwable failed)
    • Method Detail

      • failed

        public void failed​(java.lang.Throwable cause)
        Description copied from interface: Callback

        Callback invoked when the operation fails.

        Specified by:
        failed in interface Callback
        Parameters:
        cause - the reason for the operation failure
      • cancel

        public boolean cancel​(boolean mayInterruptIfRunning)
        Specified by:
        cancel in interface java.util.concurrent.Future<java.lang.Void>
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface java.util.concurrent.Future<java.lang.Void>
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface java.util.concurrent.Future<java.lang.Void>
      • get

        public java.lang.Void get()
                           throws java.lang.InterruptedException,
                                  java.util.concurrent.ExecutionException
        Specified by:
        get in interface java.util.concurrent.Future<java.lang.Void>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • get

        public java.lang.Void get​(long timeout,
                                  java.util.concurrent.TimeUnit unit)
                           throws java.lang.InterruptedException,
                                  java.util.concurrent.ExecutionException,
                                  java.util.concurrent.TimeoutException
        Specified by:
        get in interface java.util.concurrent.Future<java.lang.Void>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException
      • rethrow

        public static void rethrow​(java.util.concurrent.ExecutionException e)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object