ServerRegistrationStepHandler(String serverName, ManagementRequestContext<Void> comm) { this.serverProcessName = serverName; this.serverName = serverInventory.getProcessServerName(serverProcessName); this.comm = comm; }
ServerRegistrationStepHandler(String serverName, ManagementRequestContext<Void> comm) { this.serverProcessName = serverName; this.serverName = serverInventory.getProcessServerName(serverProcessName); this.comm = comm; }
ServerRegistrationStepHandler(String serverName, ManagementRequestContext<Void> comm) { this.serverProcessName = serverName; this.serverName = serverInventory.getProcessServerName(serverProcessName); this.comm = comm; }
public String getProcessServerName(String processName) { return serverInventory.getProcessServerName(processName); }
@Override public String getProcessServerName(String processName) { return getServerInventory().getProcessServerName(processName); }
@Override public String getProcessServerName(String processName) { return getServerInventory().getProcessServerName(processName); }
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { serverInventory.restartServer(serverModelName, TIMEOUT, model); } } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { waitForServers.add(serverModelName); } } final List<ModelNode> errorResponses = serverInventory.suspendServers(waitForServers, suspendTimeout, blockingTimeout); if ( !errorResponses.isEmpty() ){ context.getFailureDescription().set(errorResponses); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<String>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { waitForServers.add(serverModelName); } } final List<ModelNode> errorResponses = serverInventory.resumeServers(waitForServers, blockingTimeout); if ( !errorResponses.isEmpty() ){ context.getFailureDescription().set(errorResponses); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<String>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { waitForServers.add(serverModelName); } } final List<ModelNode> errorResponses = serverInventory.resumeServers(waitForServers, blockingTimeout); if ( !errorResponses.isEmpty() ){ context.getFailureDescription().set(errorResponses); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { waitForServers.add(serverModelName); } } final List<ModelNode> errorResponses = serverInventory.suspendServers(waitForServers, suspendTimeout, blockingTimeout); if ( !errorResponses.isEmpty() ){ context.getFailureDescription().set(errorResponses); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<String>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { serverInventory.restartServer(serverModelName, timeout > 0 ? timeout * 1000 : timeout, model, false, suspend); waitForServers.add(serverModelName); } } if (blocking) { serverInventory.awaitServersState(waitForServers, true); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<String>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { serverInventory.reloadServer(serverModelName, false, suspend); waitForServers.add(serverModelName); } } if (blocking) { serverInventory.awaitServersState(waitForServers, true); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<String>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { serverInventory.restartServer(serverModelName, timeout > 0 ? timeout * 1000 : timeout, model, false, suspend); waitForServers.add(serverModelName); } } if (blocking) { serverInventory.awaitServersState(waitForServers, true); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // Even though we don't read from the service registry, we are modifying a service context.getServiceRegistry(true); Map<String, ProcessInfo> processes = serverInventory.determineRunningProcesses(true); final Set<String> serversInGroup = getServersForGroup(model, group); final Set<String> waitForServers = new HashSet<String>(); for (String serverName : processes.keySet()) { final String serverModelName = serverInventory.getProcessServerName(serverName); if (group == null || serversInGroup.contains(serverModelName)) { serverInventory.reloadServer(serverModelName, false, suspend); waitForServers.add(serverModelName); } } if (blocking) { serverInventory.awaitServersState(waitForServers, true); } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }, Stage.RUNTIME);