T
- type of the ScheduledFuture
public final class CompletedScheduledFuture<T> extends Object implements ScheduledFuture<T>
ScheduledFuture
implementation.Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(Delayed o) |
static <T> CompletedScheduledFuture<T> |
create(T value) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public int compareTo(Delayed o)
compareTo
in interface Comparable<Delayed>
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<T>
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
public static <T> CompletedScheduledFuture<T> create(T value)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.