V - value type of the future.public class ScheduledFutureAdapter<V> extends Object implements ScheduledFuture<V>
Future to ScheduledFuture. This enriches the basic future with
scheduling information.| Constructor and Description |
|---|
ScheduledFutureAdapter(Future<V> delegate,
long delay,
TimeUnit timeUnit) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(Delayed o) |
boolean |
equals(Object o) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
int |
hashCode() |
boolean |
isCancelled() |
boolean |
isDone() |
public int compareTo(@Nonnull Delayed o)
compareTo in interface Comparable<Delayed>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, @Nonnull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.