Top Description Constructors Methods
com.google.common.util.concurrent.internal

public final Class InternalFutures

extends Object
Class Inheritance

Static utilities for InternalFutureFailureAccess. 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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Throwable
tryInternalFastPathGetFailure(InternalFutureFailureAccess future)

Usually returns null but, if the given Future has failed, may optionally return the cause of the failure.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InternalFuturesback to summary
private InternalFutures()

Method Detail

tryInternalFastPathGetFailureback to summary
public static Throwable tryInternalFastPathGetFailure(InternalFutureFailureAccess future)

Usually returns null but, if the given Future 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 return true
  • isCancelled() must return false
  • get() must not block, and it must throw an ExecutionException with the return value of this method as its cause