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>
0
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<R>
false
public R get() throws InterruptedException, ExecutionException
get
in interface Future<R>
null
InterruptedException
ExecutionException
public R get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<R>
null
InterruptedException
ExecutionException
TimeoutException
Copyright © 2022. All rights reserved.