Package org.ehcache.config
Interface ResourcePools
-
public interface ResourcePoolsA collection ofresource poolsthat aCachehas at its disposal to store its mappings.Implementations must be immutable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <P extends ResourcePool>
PgetPoolForResource(ResourceType<P> resourceType)Gets a specificResourcePoolbased on its type.java.util.Set<ResourceType<?>>getResourceTypeSet()Gets the set ofResourceTypes present in theResourcePools.ResourcePoolsvalidateAndMerge(ResourcePools toBeUpdated)Get a copy of thisResourcePoolsmerged with the givenResourcePools, validating that the updates to the containedResourcePools are legal.
-
-
-
Method Detail
-
getPoolForResource
<P extends ResourcePool> P getPoolForResource(ResourceType<P> resourceType)
Gets a specificResourcePoolbased on its type.- Type Parameters:
P- specific resource pool type- Parameters:
resourceType- the type of resource the pool is tracking- Returns:
- the
ResourcePool, or null if there is no pool of the requested type.
-
getResourceTypeSet
java.util.Set<ResourceType<?>> getResourceTypeSet()
Gets the set ofResourceTypes present in theResourcePools.- Returns:
- the set of
ResourceType
-
validateAndMerge
ResourcePools validateAndMerge(ResourcePools toBeUpdated) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
Get a copy of thisResourcePoolsmerged with the givenResourcePools, validating that the updates to the containedResourcePools are legal.- Parameters:
toBeUpdated- theResourcePoolsto merge with the current one.- Returns:
- a validated and merged
ResourcePools - Throws:
java.lang.IllegalArgumentException- thrown when an illegal resource value is being givenjava.lang.UnsupportedOperationException- thrown when an unsupported update is requested
-
-