Class TargetBasedExecutor

  • All Implemented Interfaces:
    ClusterExecutor

    @Service
    public final class TargetBasedExecutor
    extends Object
    implements ClusterExecutor
    Convenience implementation that delegate to a provided system executor. This provider will be looked up from the habitat by its type ClusterExecutor and the "target" name.
    • Constructor Detail

      • TargetBasedExecutor

        public TargetBasedExecutor()
    • Method Detail

      • execute

        public ActionReport.ExitCode execute​(String commandName,
                                             AdminCommand command,
                                             AdminCommandContext context,
                                             ParameterMap parameters)
        Description copied from interface: ClusterExecutor

        Execute the passed command on targeted remote instances. The list of remote instances is usually retrieved from the passed parameters (with a "target" parameter for instance) or from the configuration.

        Each remote execution must return a different ActionReport so the user or framework can get feedback on the success or failure or such executions.

        Specified by:
        execute in interface ClusterExecutor
        Parameters:
        commandName - the name of the command to execute
        command - the command to execute
        context - the original command context
        parameters - the parameters passed to the original local command
        Returns:
        the exit status of overall command replication