code: public void addResourceMetadata(String resourceName,
        ResourceMetadata resourceMetadata) {
      if (resourceMetadataMap.put(resourceName, resourceMetadata) != null) {
        throw new RuntimeException("Resource name " + resourceName +
            " already exists!");
      }
    }
docs: Add resource metadata for this pool.
  
  @param resourceName Name of the resource
  @param resourceMetadata Resource metadata associated with the name