Class ExtendedSettableFuture<V>

java.lang.Object
com.google.common.util.concurrent.internal.InternalFutureFailureAccess
com.google.common.util.concurrent.AbstractFuture<V>
io.airlift.concurrent.ExtendedSettableFuture<V>
All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<V>, Future<V>

public final class ExtendedSettableFuture<V> extends com.google.common.util.concurrent.AbstractFuture<V>
  • Method Summary

    Modifier and Type
    Method
    Description
    static <V> ExtendedSettableFuture<V>
     
    boolean
    set(V value)
     
    void
    setAsync(com.google.common.util.concurrent.ListenableFuture<? extends V> delegate)
    Sets this current future with the result of the delegate.
    boolean
     

    Methods inherited from class com.google.common.util.concurrent.AbstractFuture

    addListener, afterDone, cancel, get, get, interruptTask, isCancelled, isDone, pendingToString, setFuture, toString, tryInternalFastPathGetFailure, wasInterrupted

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • create

      public static <V> ExtendedSettableFuture<V> create()
    • set

      public boolean set(@Nullable V value)
      Overrides:
      set in class com.google.common.util.concurrent.AbstractFuture<V>
    • setException

      public boolean setException(Throwable throwable)
      Overrides:
      setException in class com.google.common.util.concurrent.AbstractFuture<V>
    • setAsync

      public void setAsync(com.google.common.util.concurrent.ListenableFuture<? extends V> delegate)
      Sets this current future with the result of the delegate.

      Values and exceptions are both propagated to this Future. If this Future is cancelled, than the delegate will also be cancelled with the same interrupt flag.