Class ForwardingFuture<V extends @Nullable java.lang.Object>

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ForwardingFuture()
      Constructor for use by subclasses.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel​(boolean mayInterruptIfRunning)  
      protected abstract java.util.concurrent.Future<? extends V> delegate()
      Returns the backing delegate instance that methods are forwarded to.
      V get()  
      V get​(long timeout, java.util.concurrent.TimeUnit unit)  
      boolean isCancelled()  
      boolean isDone()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ForwardingFuture

        protected ForwardingFuture()
        Constructor for use by subclasses.
    • Method Detail

      • delegate

        protected abstract java.util.concurrent.Future<? extends Vdelegate()
        Description copied from class: ForwardingObject
        Returns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such as ForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.
        Specified by:
        delegate in class ForwardingObject
      • cancel

        @CanIgnoreReturnValue
        public boolean cancel​(boolean mayInterruptIfRunning)
        Specified by:
        cancel in interface java.util.concurrent.Future<V extends @Nullable java.lang.Object>
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface java.util.concurrent.Future<V extends @Nullable java.lang.Object>
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface java.util.concurrent.Future<V extends @Nullable java.lang.Object>
      • get

        @CanIgnoreReturnValue
        public V get()
              throws java.lang.InterruptedException,
                     java.util.concurrent.ExecutionException
        Specified by:
        get in interface java.util.concurrent.Future<V extends @Nullable java.lang.Object>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • get

        @CanIgnoreReturnValue
        public V 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<V extends @Nullable java.lang.Object>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException