Examples of LivenessTestResult


Examples of com.elastisys.scale.cloudadapters.commons.adapter.liveness.LivenessTestResult

    }

    // collect results
    for (Future<LivenessTestResult> task : tasks) {
      try {
        LivenessTestResult result = task.get();
        LOG.debug("liveness test result: {}", result);
      } catch (Exception e) {
        LOG.warn("a runtime liveness test failed: {}", e.getMessage());
      }
    }
View Full Code Here

Examples of com.elastisys.scale.cloudadapters.commons.adapter.liveness.LivenessTestResult

    @Override
    public LivenessTestResult call() throws Exception {
      Machine machine = this.livenessCheckTask.getMachine();

      LivenessTestResult result = null;
      try {
        SshCommandResult commandResult = this.livenessCheckTask.call();
        LivenessState state = (commandResult.getExitStatus() == 0) ? LivenessState.LIVE
            : LivenessState.UNHEALTHY;
        result = new LivenessTestResult(machine, state, commandResult);
      } catch (Exception e) {
        LOG.warn("liveness check failed: {}", e.getMessage());
        result = new LivenessTestResult(machine,
            LivenessState.UNHEALTHY, e);
      }
      updateStateAndAlertOnChange(result);
      return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.