Package org.apache.flink.core.state
Interface InternalStateFuture<T>
-
- All Superinterfaces:
StateFuture<T>
- All Known Implementing Classes:
CompletedStateFuture
,ContextStateFutureImpl
,StateFutureImpl
@Internal public interface InternalStateFuture<T> extends StateFuture<T>
The Internal definition ofStateFuture
, add some method that will be used by framework.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
complete(T result)
Complete this future.void
completeExceptionally(String message, Throwable ex)
Fail this future and pass the given exception to the runtime.T
get()
Waits if necessary for the computation to complete, and then retrieves its result.boolean
isDone()
Returnstrue
if completed in any fashion: normally, exceptionally, or via cancellation.void
thenSyncAccept(ThrowingConsumer<? super T,? extends Exception> action)
Accept the action in the same thread with the one of complete (or current thread if it has been completed).-
Methods inherited from interface org.apache.flink.api.common.state.v2.StateFuture
thenAccept, thenApply, thenCombine, thenCompose, thenConditionallyAccept, thenConditionallyAccept, thenConditionallyApply, thenConditionallyApply, thenConditionallyCompose, thenConditionallyCompose
-
-
-
-
Method Detail
-
isDone
boolean isDone()
Returnstrue
if completed in any fashion: normally, exceptionally, or via cancellation.- Returns:
true
if completed
-
get
T get()
Waits if necessary for the computation to complete, and then retrieves its result.
-
complete
void complete(T result)
Complete this future.
-
completeExceptionally
void completeExceptionally(String message, Throwable ex)
Fail this future and pass the given exception to the runtime.- Parameters:
message
- the description of this exceptionex
- the exception
-
thenSyncAccept
void thenSyncAccept(ThrowingConsumer<? super T,? extends Exception> action)
Accept the action in the same thread with the one of complete (or current thread if it has been completed).- Parameters:
action
- the action to perform.
-
-