public class CompletableActorFuture<V> extends Object implements ActorFuture<V>
| Modifier and Type | Field and Description |
|---|---|
protected String |
failure |
protected Throwable |
failureCause |
protected V |
value |
| Constructor and Description |
|---|
CompletableActorFuture() |
| Modifier and Type | Method and Description |
|---|---|
void |
block(ActorTask onCompletion)
To be used by scheduler only
|
boolean |
cancel(boolean mayInterruptIfRunning) |
boolean |
close()
future is reusable after close
|
void |
complete(V value) |
static <V> CompletableActorFuture<V> |
completed(V result) |
static <V> CompletableActorFuture<V> |
completedExceptionally(Throwable throwable) |
void |
completeExceptionally(String failure,
Throwable throwable) |
void |
completeExceptionally(Throwable throwable) |
void |
completeWith(CompletableActorFuture<V> otherFuture) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
Throwable |
getException() |
boolean |
isAwaitingResult() |
boolean |
isCancelled() |
boolean |
isClosed() |
boolean |
isCompletedExceptionally() |
boolean |
isDone() |
V |
join() |
void |
setAwaitingResult() |
String |
toString() |
protected V value
protected String failure
protected Throwable failureCause
public void setAwaitingResult()
public static <V> CompletableActorFuture<V> completed(V result)
public static <V> CompletableActorFuture<V> completedExceptionally(Throwable throwable)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public boolean isCompletedExceptionally()
isCompletedExceptionally in interface ActorFuture<V>public boolean isAwaitingResult()
public void block(ActorTask onCompletion)
ActorFutureblock in interface ActorFuture<V>public V get() throws ExecutionException, InterruptedException
get in interface Future<V>ExecutionExceptionInterruptedExceptionpublic V get(long timeout, TimeUnit unit) throws ExecutionException, TimeoutException, InterruptedException
get in interface Future<V>ExecutionExceptionTimeoutExceptionInterruptedExceptionpublic void complete(V value)
complete in interface ActorFuture<V>public void completeExceptionally(String failure, Throwable throwable)
completeExceptionally in interface ActorFuture<V>public void completeExceptionally(Throwable throwable)
completeExceptionally in interface ActorFuture<V>public V join()
join in interface ActorFuture<V>public boolean close()
public boolean isClosed()
public Throwable getException()
getException in interface ActorFuture<V>public void completeWith(CompletableActorFuture<V> otherFuture)
Copyright © 2017–2019 camunda services GmbH. All rights reserved.