public final class ScheduledFutureWrapper extends Object implements ScheduledFuture<Object>
| Constructor and Description |
|---|
ScheduledFutureWrapper(ScheduledFuture<?> future) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Just make sure to avoid wrong usage of Future.cancel(true).
|
int |
compareTo(Delayed o) |
Object |
get() |
Object |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public ScheduledFutureWrapper(ScheduledFuture<?> future)
public int compareTo(Delayed o)
compareTo in interface Comparable<Delayed>public boolean cancel(boolean mayInterruptIfRunning)
public Object get() throws InterruptedException, ExecutionException
get in interface Future<Object>InterruptedExceptionExecutionExceptionpublic Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Object>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic boolean isCancelled()
isCancelled in interface Future<Object>Copyright © 2014–2015. All rights reserved.