private int getPrecedenceLevel(RouterErrorCode routerErrorCode) {
    switch (routerErrorCode) {
      case InsufficientCapacity:
        return 1;
      case TooManyRequests:
        return 2;
      case AmbryUnavailable:
        return 3;
      case UnexpectedInternalError:
        return 4;
      case OperationTimedOut:
        return 5;
      default:
        return Integer.MIN_VALUE;
    }
  }
Gets the precedence level for a {@link RouterErrorCode}. A precedence level is a relative priority assigned
to a {@link RouterErrorCode}. If a {@link RouterErrorCode} has not been assigned a precedence level, a
{@code Integer.MIN_VALUE} will be returned.
@param routerErrorCode The {@link RouterErrorCode} for which to get its precedence level.
@return The precedence level of the {@link RouterErrorCode}.
ambry-router/src/main/java/com/github/ambry/router/PutOperation.java