Package com.hubspot.singularity.data.AbstractMachineManager

Examples of com.hubspot.singularity.data.AbstractMachineManager.DecomissionResult


  }

  protected abstract String getObjectTypeString();

  public void decomission(String objectId, Optional<String> user) {
    DecomissionResult result = manager.decomission(objectId, user);

    if (result == DecomissionResult.FAILURE_NOT_FOUND || result == DecomissionResult.FAILURE_DEAD) {
      throw new NotFoundException(String.format("Couldn't find an active %s with id %s (result: %s)", getObjectTypeString(), objectId, result.name()));
    } else if (result == DecomissionResult.FAILURE_ALREADY_DECOMISSIONING) {
      throw new ConflictException(String.format("%s %s is already in decomissioning state", getObjectTypeString(), objectId));
    }
  }
View Full Code Here

TOP

Related Classes of com.hubspot.singularity.data.AbstractMachineManager.DecomissionResult

Copyright © 2018 www.massapicom. 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.