R - result typepublic class DefaultScheduledFuture<R> extends Object implements ScheduledFuture<R>
Scheduler implementations.| Constructor and Description |
|---|
DefaultScheduledFuture() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(Delayed o) |
R |
get() |
R |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public int compareTo(Delayed o)
compareTo in interface Comparable<Delayed>0public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<R>falsepublic R get() throws InterruptedException, ExecutionException
get in interface Future<R>nullInterruptedExceptionExecutionExceptionpublic R get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<R>nullInterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2022. All rights reserved.