private long verifyLongInString(String propertyString, String property) {
    long returnValue;
    try {
      returnValue = Long.parseLong(propertyString);
    } catch (NumberFormatException e) {
      throw new IllegalArgumentException(
          String.format("%s has to be a valid number and not %s",
              property, propertyString));
    }

    if (returnValue < 0) {
      throw new IllegalArgumentException(
          String.format("%s has to be positive number and the value given %s is not acceptable",
              property, returnValue));
    }

    return returnValue;
  }
Verifys if the string passed, is in a number format which is acceptable and returns the long
value of the string.

@return the long value of the string
geode-core/src/main/java/org/apache/geode/internal/cache/DiskWriteAttributesImpl.java