Class CommandResponseManager


  • public class CommandResponseManager
    extends java.lang.Object
    Wrapper API for interacting with Command Response Manager of a component

    param: commandResponseManagerActor underlying actor managing command responses, completion of command, caching responses for command, etc. param: actorSystem actor system for managing stream resources inside

    • Constructor Detail

      • CommandResponseManager

        public CommandResponseManager​(akka.actor.typed.ActorRef<CommandResponseManagerMessage> commandResponseManagerActor,
                                      akka.actor.typed.ActorSystem<?> actorSystem)
    • Method Detail

      • actorSystem

        public akka.actor.typed.ActorSystem<?> actorSystem()
      • addSubCommand

        public void addSubCommand​(Id parentRunId,
                                  Id childRunId)
        Add a new sub command against another command

        Parameters:
        parentRunId - command identifier of original command
        childRunId - command identifier of sub command
      • jQuery

        public java.util.concurrent.CompletableFuture<CommandResponse.QueryResponse> jQuery​(Id runId,
                                                                                            akka.util.Timeout timeout)
        A helper method for Java to query the current status of a command

        Parameters:
        runId - command identifier of command
        timeout - timeout duration until which this operation is expected to wait for providing a value
        Returns:
        a future of CommandResponse
      • jQueryFinal

        public java.util.concurrent.CompletableFuture<CommandResponse.SubmitResponse> jQueryFinal​(Id runId,
                                                                                                  akka.util.Timeout timeout)
        A helper method for java to query the final status of a command

        Parameters:
        runId - command identifier of command
        timeout - timeout duration until which this operation is expected to wait for providing a value
        Returns:
        a CompletableFuture of CommandResponse
      • query

        public scala.concurrent.Future<CommandResponse.QueryResponse> query​(Id runId,
                                                                            akka.util.Timeout timeout)
        Query the current status of a command

        Parameters:
        runId - command identifier of command
        timeout - timeout duration until which this operation is expected to wait for providing a value
        Returns:
        a future of CommandResponse
      • queryFinal

        public scala.concurrent.Future<CommandResponse.SubmitResponse> queryFinal​(Id runId,
                                                                                  akka.util.Timeout timeout)
        Query the final status of a command

        Parameters:
        runId - command identifier of command
        timeout - timeout duration until which this operation is expected to wait for providing a value
        Returns:
        a future of CommandResponse