Package org.apache.flink.runtime.state
Class DoneFuture<T>
- java.lang.Object
-
- org.apache.flink.runtime.state.DoneFuture<T>
-
- Type Parameters:
T
- The type of object in thisFuture
.
- All Implemented Interfaces:
Runnable
,Future<T>
,RunnableFuture<T>
public class DoneFuture<T> extends Object implements RunnableFuture<T>
AFuture
that is always done and will just yield the object that was given at creation time.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DoneFuture(T payload)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
T
get()
T
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
static <T> DoneFuture<T>
of(T result)
void
run()
-
-
-
Constructor Detail
-
DoneFuture
protected DoneFuture(@Nullable T payload)
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<T>
-
run
public void run()
- Specified by:
run
in interfaceRunnable
- Specified by:
run
in interfaceRunnableFuture<T>
-
of
public static <T> DoneFuture<T> of(@Nullable T result)
-
-