Package org.apache.flink.core.testutils
Class ScheduledTask<T>
java.lang.Object
org.apache.flink.core.testutils.ScheduledTask<T>
- Type Parameters:
T- type of the result
- All Implemented Interfaces:
Comparable<Delayed>,Delayed,Future<T>,ScheduledFuture<T>
ScheduledTask represents a task which is executed at a later point in time.
-
Constructor Summary
ConstructorsConstructorDescriptionScheduledTask(Callable<T> callable, long delay) ScheduledTask(Callable<T> callable, long delay, long period) -
Method Summary
-
Constructor Details
-
ScheduledTask
-
ScheduledTask
-
-
Method Details
-
isPeriodic
public boolean isPeriodic() -
getPeriod
public long getPeriod() -
execute
public void execute() -
getDelay
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone() -
get
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, @Nonnull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
getCallable
-