Package org.apache.flink.core.state
Class StateFutureUtils
- java.lang.Object
-
- org.apache.flink.core.state.StateFutureUtils
-
@Experimental public class StateFutureUtils extends Object
A collection of utilities that expand the usage ofStateFuture
. All the methods can only be accessed within user function provided toKeyedStream
.
-
-
Constructor Summary
Constructors Constructor Description StateFutureUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> StateFuture<Collection<T>>
combineAll(Collection<? extends StateFuture<? extends T>> futures)
Creates a future that is complete once multiple other futures completed.static <V> StateFuture<V>
completedFuture(V result)
Returns a completed future that does nothing and return provided result.static <V> StateFuture<V>
completedVoidFuture()
Returns a completed future that does nothing and return null.
-
-
-
Method Detail
-
completedVoidFuture
public static <V> StateFuture<V> completedVoidFuture()
Returns a completed future that does nothing and return null.
-
completedFuture
public static <V> StateFuture<V> completedFuture(V result)
Returns a completed future that does nothing and return provided result.
-
combineAll
public static <T> StateFuture<Collection<T>> combineAll(Collection<? extends StateFuture<? extends T>> futures)
Creates a future that is complete once multiple other futures completed. Upon successful completion, the future returns the collection of the futures' results.- Parameters:
futures
- The futures that make up the conjunction. No null entries are allowed, otherwise a IllegalArgumentException will be thrown.- Returns:
- The StateFuture that completes once all given futures are complete.
-
-