private <A extends ClusterManagementOperation<V>, V extends OperationResult> ClusterManagementOperationResult<A, V> toClusterManagementOperationResult(
      OperationState<A, V> operationState) {
    StatusCode resultStatus = StatusCode.OK;
    String resultMessage = "";
    if (operationState.getOperationEnd() == null) {
      resultStatus = StatusCode.IN_PROGRESS;
    } else if (operationState.getThrowable() != null) {
      resultStatus = StatusCode.ERROR;
      resultMessage = operationState.getThrowable().toString();
    } else if (operationState.getResult() != null) {
      if (!operationState.getResult().getSuccess()) {
        resultStatus = StatusCode.ERROR;
      }
      if (operationState.getResult().getStatusMessage() != null) {
        resultMessage = operationState.getResult().getStatusMessage();
      }
    }
    return toClusterManagementOperationResult(resultStatus, resultMessage, operationState);
  }
each locator will have one instance of this running if enabled
geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java