public static int statusNameToCode(String statusName) {
    for (int i = STOPPED_STATUS_CODE; i <= STARTED_STATUS_CODE; i++) {
      if (statusNames.get(i).equalsIgnoreCase(statusName)) {
        return i;
      }
    }
    throw new IllegalArgumentException(
        String.format("Unknown statusName %s", statusName));
  }
Gets the status code for the given <code>statusName</code>.

@throws IllegalArgumentException if an unknown status name is given.
geode-core/src/main/java/org/apache/geode/internal/ManagerInfo.java