public abstract class DeferredTask extends Object implements RunnableScheduledFuture<Object>
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFERRED_DELAY_IN_MILLISECONDS |
| Modifier | Constructor and Description |
|---|---|
protected |
DeferredTask(long delayInMilliSeconds) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(Delayed o) |
abstract boolean |
equals(Object o) |
Object |
get() |
Object |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
long |
getDelayInMilliSeconds() |
abstract int |
hashCode() |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isPeriodic() |
abstract void |
run() |
public abstract void run()
run in interface Runnablerun in interface RunnableFuture<Object>public final long getDelayInMilliSeconds()
public final boolean isPeriodic()
isPeriodic in interface RunnableScheduledFuture<Object>public final int compareTo(Delayed o)
compareTo in interface Comparable<Delayed>public final boolean cancel(boolean mayInterruptIfRunning)
public final boolean isCancelled()
isCancelled in interface Future<Object>public final Object get() throws InterruptedException, ExecutionException
get in interface Future<Object>InterruptedExceptionExecutionExceptionpublic final Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Object>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2019. All rights reserved.