Constructor and Description |
---|
PrecompletedFuture(Throwable throwable)
Create a pre-completed future for a failed operation which will throw the given
Throwable (wrapped in an ExecutionException ) upon calling get() . |
PrecompletedFuture(V value)
Create a pre-completed future with the given result value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public PrecompletedFuture(V value)
public PrecompletedFuture(Throwable throwable)
Throwable
(wrapped in an ExecutionException
) upon calling get()
.public boolean cancel(boolean mayInterruptIfRunning)
public V get() throws ExecutionException
get
in interface Future<V>
ExecutionException
public V get(long timeout, TimeUnit unit) throws ExecutionException
get
in interface Future<V>
ExecutionException
public boolean isCancelled()
isCancelled
in interface Future<V>
Copyright © 2024 levigo holding gmbh. All rights reserved.