public class IndexedTaskDecorator<V> extends Object implements ScheduledFuture<V>
Constructor and Description |
---|
IndexedTaskDecorator(ScheduledFuture<V> delegate,
int taskIdx) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(Delayed o) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
int |
getTaskIdx() |
boolean |
isCancelled() |
boolean |
isDone() |
String |
toString() |
public IndexedTaskDecorator(ScheduledFuture<V> delegate, int taskIdx)
public int compareTo(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>
InterruptedException
ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
public int getTaskIdx()
Copyright © 2021. All rights reserved.