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 newSettableFuture
in the default state.boolean
Deprecated.Sets the value of this future.boolean
setException
(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, isDone
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Method Details
-
create
Deprecated.Creates a newSettableFuture
in the default state. -
set
Deprecated.Sets the value of this future. This method will returntrue
if the value was successfully set, orfalse
if 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 anExecutionException
and thrown from theget
methods. This method will returntrue
if the exception was successfully set, orfalse
if the future has already been set or cancelled.- Parameters:
throwable
- the exception the future should hold.- Returns:
- true if the exception was successfully set.
-