Examples of LivenessState


Examples of com.elastisys.scale.cloudadapers.api.types.LivenessState

    List<Machine> livenessDecoratedMachines = Lists.newArrayList();
    List<Machine> machines = this.delegate.listMachines();
    for (Machine machine : machines) {
      if (Machine.isActive().apply(machine)) {
        // liveness is only relevant for active members
        LivenessState liveness = this.livenessTracker
            .getLiveness(machine);
        machine.setLiveness(liveness);
      }
      livenessDecoratedMachines.add(machine);
    }
View Full Code Here

Examples of com.elastisys.scale.cloudadapers.api.types.LivenessState

   * @param livenessTestResult
   */
  private void updateStateAndAlertOnChange(
      LivenessTestResult livenessTestResult) {
    Machine machine = livenessTestResult.getMachine();
    LivenessState newState = livenessTestResult.getState();

    String id = machine.getId();
    LivenessState previousState = this.livenessObservations.get(id);
    this.livenessObservations.put(machine.getId(), newState);

    if ((previousState == null) || (previousState != newState)) {
      LivenessStateChange livenessChange = new LivenessStateChange(
          machine, previousState, newState);
View Full Code Here

Examples of com.elastisys.scale.cloudadapers.api.types.LivenessState

      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,
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.