Adds the {@link ResourcePools} to the returned builder.
<p>
{@link ResourcePools} is what determines the tiering of a cache.

@param resourcePools the resource pools to use
@return a new builder with the added resource pools
761075
public CacheConfigurationBuilder<K, V> withResourcePools(ResourcePools resourcePools) {
    if (resourcePools == null) {
      throw new NullPointerException("Null resource pools");
    }
    CacheConfigurationBuilder<K, V> otherBuilder = new CacheConfigurationBuilder<>(this);
    otherBuilder.resourcePools = resourcePools;
    return otherBuilder;
  }
325316
private static <L> Map<Name, TypeSet<ResourceType<L>>> buildTypeMapForConstructor(
            Collection<ResourceType<L>> allTypes) {
        TypeSetBuilder<ResourceType<L>> bldr = TypeSet.<ResourceType<L>> builder();
        bldr.enabled(true);
        bldr.name(new Name("all"));
        for (ResourceType<L> type : allTypes) {
            bldr.type(type);
        }
        TypeSet<ResourceType<L>> typeSet = bldr.build();

        return Collections.singletonMap(typeSet.getName(), typeSet);
    }
455462
public static <T extends ResourceId> Builder<T> newBuilder(Status status, T replacement) {
    return new Builder<T>().setStatus(status).setReplacement(replacement);
  }
867372
public List<Resource> buildResources() {
        List<Resource> resources = new ArrayList<Resource>();
        for (ResourceBuilder builder : _resourceBuilders) {
            Resource resource = builder.build();
            if (resource != null) {
                resources.add(resource);
            }
        }
        return resources;
    }
1077553
@Override
    public void build() {
        if (site != null) {
            site.getProcessors().beforeBuildTheme(this);
        }

        initializeResourceBuilders();
        if (!builders.isEmpty()) {
            try {
                for (ResourceBuilder builder : builders) {
                    builder.build();
                }
            } catch (RuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new RuntimeException("Theme build exception", e);
            }
        }

        if (site != null) {
            site.getProcessors().afterBuildTheme(this);
        }
    }
296571
public final UserManagedCacheBuilder<K, V, T> withClassLoader(ClassLoader classLoader) {
    if (classLoader == null) {
      throw new NullPointerException("Null classloader");
    }
    UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this);
    otherBuilder.classLoader = classLoader;
    return otherBuilder;
  }
817516
private CommonsPoolFactory getCommonsPoolFactory(TargetMetaDef targetMetaDef) {
		try {
			ContainerWrapper containerWrapper = containerCallback.getContainerWrapper();
			InstanceCache instanceCache = (InstanceCache) containerWrapper.lookup(ComponentKeys.INSTANCE_CACHE);

			String key = targetMetaDef.getCacheKey() + " CommonsPoolFactory";

			CommonsPoolFactory commonsPoolFactoryExist = (CommonsPoolFactory) instanceCache.get(key);
			CommonsPoolFactory commonsPoolFactoryNew = null;
			if (commonsPoolFactoryExist == null) {
				Debug.logVerbose("[JdonFramework] first time call commonsPoolFactory， create it:" + key, module);
				commonsPoolFactoryNew = create(targetServiceFactory, poolConfigure.getMaxPoolSize());
				commonsPoolFactoryExist = (CommonsPoolFactory)instanceCache.putIfAbsent(key, commonsPoolFactoryNew);
			}
			return commonsPoolFactoryExist != null?commonsPoolFactoryExist:commonsPoolFactoryNew;

		} catch (Exception ex) {
			Debug.logError(ex, module);
			return null;
		}
		
	}
965009
public static <K, V> QueuedKeyedResourcePool<K, V> create(ResourceFactory<K, V> factory) {
        return create(factory, new ResourcePoolConfig());
    }
309145
private void createPool(String poolName, Properties connectionPoolProperties) {

    releaseConnectionPool(poolName);

    // DBUtils execute methods require autoCommit to be true.
    connectionPoolProperties.put("autoCommit", true);

    HikariConfig config = new HikariConfig(connectionPoolProperties);
    config.setPoolName(poolName);
    HikariDataSource ds = new HikariDataSource(config);
    pools.put(poolName, ds);
    logger.info("Initialized pool '{}'", poolName);
  }
191900
public V put(ResourceType type, PoolInfo poolInfo, V value) {
    Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type);
    if (poolInfoMap == null) {
      poolInfoMap = new HashMap<PoolInfo, V>();
      typePoolInfoMap.put(type, poolInfoMap);
    }
    return poolInfoMap.put(poolInfo, value);
  }
307066
public V get(ResourceType type, PoolInfo poolInfo) {
    Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type);
    if (poolInfoMap == null) {
      return null;
    }
    return poolInfoMap.get(poolInfo);
  }
1070650
public static base_responses add(nitro_service client, cacheselector resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			cacheselector addresources[] = new cacheselector[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new cacheselector();
				addresources[i].selectorname = resources[i].selectorname;
				addresources[i].rule = resources[i].rule;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
1011148
public CacheConfigurationBuilder<K, V> withResilienceStrategy(ResilienceStrategy<K, V> resilienceStrategy) {
    return addOrReplaceConfiguration(new DefaultResilienceStrategyConfiguration(requireNonNull(resilienceStrategy, "Null resilienceStrategy")));
  }
1062408
public static <K, V> QueuedKeyedResourcePool<K, V> create(ResourceFactory<K, V> factory,
                                                              ResourcePoolConfig config) {
        return new QueuedKeyedResourcePool<K, V>(factory, config);
    }
288976
@Override
  @SuppressWarnings("unchecked")
  public CacheManagerBuilder<PersistentCacheManager> builder(final CacheManagerBuilder<? extends CacheManager> other) {
    return (CacheManagerBuilder<PersistentCacheManager>)other.using(this);
  }
378407
public static ResourcePoolsBuilder newResourcePoolsBuilder(ResourcePools pools) {
    ResourcePoolsBuilder poolsBuilder = new ResourcePoolsBuilder();
    for (ResourceType<?> currentResourceType : pools.getResourceTypeSet()) {
      poolsBuilder = poolsBuilder.with(pools.getPoolForResource(currentResourceType));
    }
    return poolsBuilder;
  }
740143
public static List<ResourceBuilder> builders(ClassLoader classLoader, KnowledgeComponentImplementationModel implementationModel) {
        List<ResourceBuilder> builders = new ArrayList<ResourceBuilder>();
        if (implementationModel != null) {
            ManifestModel manifestModel = implementationModel.getManifest();
            if (manifestModel != null) {
                ResourcesModel resourcesModel = manifestModel.getResources();
                builders.addAll(builders(classLoader, resourcesModel));
            }
        }
        return builders;
    }