Class CompletedStateFuture<T>

  • All Implemented Interfaces:
    org.apache.flink.api.common.state.v2.StateFuture<T>, InternalStateFuture<T>

    @Internal
    public class CompletedStateFuture<T>
    extends Object
    implements InternalStateFuture<T>
    A StateFuture that has already been completed when it is created.
    • Method Summary

      All Methods Instance Methods Concrete 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.
      org.apache.flink.api.common.state.v2.StateFuture<Void> thenAccept​(org.apache.flink.util.function.ThrowingConsumer<? super T,​? extends Exception> action)  
      <U> org.apache.flink.api.common.state.v2.StateFuture<U> thenApply​(org.apache.flink.util.function.FunctionWithException<? super T,​? extends U,​? extends Exception> fn)  
      <U,​V>
      org.apache.flink.api.common.state.v2.StateFuture<V>
      thenCombine​(org.apache.flink.api.common.state.v2.StateFuture<? extends U> other, org.apache.flink.util.function.BiFunctionWithException<? super T,​? super U,​? extends V,​? extends Exception> fn)  
      <U> org.apache.flink.api.common.state.v2.StateFuture<U> thenCompose​(org.apache.flink.util.function.FunctionWithException<? super T,​? extends org.apache.flink.api.common.state.v2.StateFuture<U>,​? extends Exception> action)  
      void thenSyncAccept​(org.apache.flink.util.function.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).
    • Method Detail

      • thenApply

        public <U> org.apache.flink.api.common.state.v2.StateFuture<U> thenApply​(org.apache.flink.util.function.FunctionWithException<? super T,​? extends U,​? extends Exception> fn)
        Specified by:
        thenApply in interface org.apache.flink.api.common.state.v2.StateFuture<T>
      • thenAccept

        public org.apache.flink.api.common.state.v2.StateFuture<Void> thenAccept​(org.apache.flink.util.function.ThrowingConsumer<? super T,​? extends Exception> action)
        Specified by:
        thenAccept in interface org.apache.flink.api.common.state.v2.StateFuture<T>
      • thenCompose

        public <U> org.apache.flink.api.common.state.v2.StateFuture<U> thenCompose​(org.apache.flink.util.function.FunctionWithException<? super T,​? extends org.apache.flink.api.common.state.v2.StateFuture<U>,​? extends Exception> action)
        Specified by:
        thenCompose in interface org.apache.flink.api.common.state.v2.StateFuture<T>
      • thenCombine

        public <U,​V> org.apache.flink.api.common.state.v2.StateFuture<V> thenCombine​(org.apache.flink.api.common.state.v2.StateFuture<? extends U> other,
                                                                                           org.apache.flink.util.function.BiFunctionWithException<? super T,​? super U,​? extends V,​? extends Exception> fn)
        Specified by:
        thenCombine in interface org.apache.flink.api.common.state.v2.StateFuture<T>
      • thenSyncAccept

        public void thenSyncAccept​(org.apache.flink.util.function.ThrowingConsumer<? super T,​? extends Exception> action)
        Description copied from interface: InternalStateFuture
        Accept the action in the same thread with the one of complete (or current thread if it has been completed).
        Specified by:
        thenSyncAccept in interface InternalStateFuture<T>
        Parameters:
        action - the action to perform.