T - type of the resultpublic final class ScheduledTask<T> extends Object implements ScheduledFuture<T>
| 构造器和说明 |
|---|
ScheduledTask(Callable<T> callable,
long delay) |
ScheduledTask(Callable<T> callable,
long delay,
long period) |
public boolean isPeriodic()
public long getPeriod()
public void execute()
public int compareTo(Delayed o)
compareTo 在接口中 Comparable<Delayed>public boolean isCancelled()
isCancelled 在接口中 Future<T>public T get() throws InterruptedException, ExecutionException
get 在接口中 Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, @Nonnull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get 在接口中 Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.