Class InternalFutures
- java.lang.Object
-
- com.google.common.util.concurrent.internal.InternalFutures
-
public final class InternalFutures extends Object
Static utilities forInternalFutureFailureAccess
. Most users will never need to use this class.This class is GWT-compatible.
- Since:
com.google.guava:failureaccess:1.0
, which was added as a dependency of Guava in Guava 27.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Throwable
tryInternalFastPathGetFailure(InternalFutureFailureAccess future)
Usually returnsnull
but, if the givenFuture
has failed, may optionally return the cause of the failure.
-
-
-
Method Detail
-
tryInternalFastPathGetFailure
public static Throwable tryInternalFastPathGetFailure(InternalFutureFailureAccess future)
Usually returnsnull
but, if the givenFuture
has failed, may optionally return the cause of the failure. "Failure" means specifically "completed with an exception"; it does not include "was cancelled." To be explicit: If this method returns a non-null value, then:isDone()
must returntrue
isCancelled()
must returnfalse
get()
must not block, and it must throw anExecutionException
with the return value of this method as its cause
-
-