Class SettableFuture<V>
java.lang.Object
com.google.common.util.concurrent.AbstractFuture<V>
com.google.common.util.concurrent.SettableFuture<V>
- All Implemented Interfaces:
ListenableFuture<V>,Future<V>
Deprecated.
The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
A
ListenableFuture whose result may be set by a set(Object)
or setException(Throwable) call. It may also be cancelled.- Since:
- 9.0 (in 1.0 as
ValueFuture)
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Method Summary
Modifier and TypeMethodDescriptionstatic <V> SettableFuture<V> create()Deprecated.Creates a newSettableFuturein the default state.booleanDeprecated.Sets the value of this future.booleansetException(Throwable throwable) Deprecated.Sets the future to having failed with the given exception.Methods inherited from class com.google.common.util.concurrent.AbstractFuture
addListener, cancel, get, get, isCancelled, isDoneMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Method Details
-
create
Deprecated.Creates a newSettableFuturein the default state. -
set
Deprecated.Sets the value of this future. This method will returntrueif the value was successfully set, orfalseif the future has already been set or cancelled.- Parameters:
value- the value the future should hold.- Returns:
- true if the value was successfully set.
-
setException
Deprecated.Sets the future to having failed with the given exception. This exception will be wrapped in anExecutionExceptionand thrown from thegetmethods. This method will returntrueif the exception was successfully set, orfalseif the future has already been set or cancelled.- Parameters:
throwable- the exception the future should hold.- Returns:
- true if the exception was successfully set.
-