Class ScheduledFutureAdapter<V>
- java.lang.Object
-
- org.apache.flink.runtime.concurrent.ScheduledFutureAdapter<V>
-
- Type Parameters:
V- value type of the future.
- All Implemented Interfaces:
Comparable<Delayed>,Delayed,Future<V>,ScheduledFuture<V>
public class ScheduledFutureAdapter<V> extends Object implements ScheduledFuture<V>
Adapter fromFuturetoScheduledFuture. This enriches the basic future with scheduling information.
-
-
Constructor Summary
Constructors Constructor Description ScheduledFutureAdapter(Future<V> delegate, long delay, TimeUnit timeUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)intcompareTo(Delayed o)booleanequals(Object o)Vget()Vget(long timeout, TimeUnit unit)longgetDelay(TimeUnit unit)inthashCode()booleanisCancelled()booleanisDone()
-
-
-
Method Detail
-
compareTo
public int compareTo(@Nonnull Delayed o)- Specified by:
compareToin interfaceComparable<V>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionException
-
get
public V get(long timeout, @Nonnull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
-