private ExtendedResourceProviderWrapper ensureResourceProviderWrapper(Type type) {
    synchronized (resourceProviders) {
      if (!resourceProviders.containsKey(type)) {
        resourceProviders.put(type, new ExtendedResourceProviderWrapper(providerModule.getResourceProvider(type)));
      }
    }
    return resourceProviders.get(type);
  }
Get the extended resource provider for the given type, creating it if required.

@param type  the resource type

@return the resource provider
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java