public class SimpleCompletableFuture<T> extends AbstractCompletableFuture<T> implements InternalCompletableFuture<T>
InternalCompletableFuture
. Requires only
NodeEngine
.Constructor and Description |
---|
SimpleCompletableFuture(Executor executor,
ILogger logger) |
SimpleCompletableFuture(NodeEngine nodeEngine) |
Modifier and Type | Method and Description |
---|---|
boolean |
complete(Object value)
Completes this future.
|
T |
join()
Waits for this future to complete.
|
boolean |
setResult(Object result)
Sets the result.
|
andThen, andThen, cancel, cancelled, done, get, get, getResult, isCancelled, isDone, shouldCancel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, andThen
public SimpleCompletableFuture(NodeEngine nodeEngine)
public boolean setResult(Object result)
AbstractCompletableFuture
result
is an instance of Throwable, this
future will be completed exceptionally. That is, AbstractCompletableFuture.get()
will throw
the exception rather than return it.setResult
in class AbstractCompletableFuture<T>
public T join()
InternalCompletableFuture
join
in interface InternalCompletableFuture<T>
public boolean complete(Object value)
InternalCompletableFuture
complete
in interface InternalCompletableFuture<T>
value
- the value to complete this future with.true
if this invocation caused this InternalCompletableFuture to complete, else false
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.