public Short getShortFromAllowedValues(String name, Short defaultVal, Short[] allowedValues) {
    List<Short> allowedValuesList = Arrays.asList(allowedValues);
    Short v = containsKey(name) ? Short.parseShort(getProperty(name)) : defaultVal;
    if (allowedValuesList.contains(v)) {
      return v;
    } else {
      throw new IllegalArgumentException(
          name + " has value " + v + " which is not among the allowed values: " + allowedValuesList);
    }
  }
Read a short from the properties instance. Throw an exception if the value is not among the allowed values
@param name The property name
@param defaultVal The default value to use if the property is not found
@param allowedValues The array of allowed values for this property.
@return the Short value
ambry-api/src/main/java/com/github/ambry/config/VerifiableProperties.java