Class InvocationStage

  • Direct Known Subclasses:

    public abstract class InvocationStage
    extends java.lang.Object
    A partial command invocation, either completed or in progress. It is similar to a CompletionStage, but it allows more callback functions to be stateless by passing the context and the invoked command as parameters. Unlike CompletionStage, adding a callback can delay the completion of the initial stage and change its result.
    Dan Berindei
    • Constructor Detail

      • InvocationStage

        public InvocationStage()
    • Method Detail

      • get

        public abstract java.lang.Object get()
                                      throws java.lang.Throwable
        Wait for the invocation to complete and return its value.
        java.lang.Throwable - Any exception raised during the invocation.
      • isDone

        public abstract boolean isDone()
        true if the invocation is complete.
      • toCompletableFuture

        public abstract java.util.concurrent.CompletableFuture<java.lang.Object> toCompletableFuture()
        CompletableFuture conversion.
      • thenApply

        public java.lang.Object thenApply​(InvocationContext ctx,
                                          org.infinispan.commands.VisitableCommand command,
                                          InvocationSuccessFunction function)
        After the current stage completes successfully, invoke function and return its result. The result may be either a plain value, or a new InvocationStage.