@Override public Future<DeploymentPlanResult> execute(DeploymentPlan plan) { if (!(plan instanceof DeploymentPlanImpl)) { throw MESSAGES.cannotUseDeploymentPlan(); } DeploymentPlanImpl planImpl = DeploymentPlanImpl.class.cast(plan); Map<UUID, List<String>> actionsById = new HashMap<UUID, List<String>>(); Operation operation = getDeploymentPlanOperation(planImpl, actionsById); Future<ModelNode> future = client.executeAsync(operation, null); return new DomainDeploymentPlanResultFuture(planImpl, future, new LinkedHashSet<ServerIdentity>(client.getServerStatuses().keySet()), actionsById); }
/** {@inheritDoc} */ @Override public Future<ServerDeploymentPlanResult> execute(DeploymentPlan plan) { if (!(plan instanceof DeploymentPlanImpl)) { throw MESSAGES.cannotUseDeploymentPlan(); } DeploymentPlanImpl planImpl = (DeploymentPlanImpl) plan; Operation operation = getCompositeOperation(planImpl); Future<ModelNode> nodeFuture = executeOperation(operation); return new ServerDeploymentPlanResultFuture(planImpl, nodeFuture); }