org.ehcache.core.config
Class ResourcePoolsImpl

java.lang.Object
  extended by org.ehcache.core.config.ResourcePoolsImpl
All Implemented Interfaces:
ResourcePools

public class ResourcePoolsImpl
extends java.lang.Object
implements ResourcePools


Constructor Summary
ResourcePoolsImpl(java.util.Map<ResourceType,ResourcePool> pools)
           
 
Method Summary
 ResourcePool getPoolForResource(ResourceType resourceType)
          Get a specific ResourcePool based on its type.
 java.util.Set<ResourceType> getResourceTypeSet()
          Get the set of ResourceType of all the pools present in the ResourcePools
 ResourcePools validateAndMerge(ResourcePools toBeUpdated)
          Get a copy of the current ResourcePools merged with another ResourcePools and validate that the updates to the contained ResourcePools are legal.
static void validateResourcePools(java.util.Collection<? extends ResourcePool> pools)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePoolsImpl

public ResourcePoolsImpl(java.util.Map<ResourceType,ResourcePool> pools)
Method Detail

getPoolForResource

public ResourcePool getPoolForResource(ResourceType resourceType)
Description copied from interface: ResourcePools
Get a specific ResourcePool based on its type.

Specified by:
getPoolForResource in interface ResourcePools
Parameters:
resourceType - the type of resource the pool is tracking.
Returns:
the ResourcePool, or null if there is no pool tracking the requested type.

getResourceTypeSet

public java.util.Set<ResourceType> getResourceTypeSet()
Description copied from interface: ResourcePools
Get the set of ResourceType of all the pools present in the ResourcePools

Specified by:
getResourceTypeSet in interface ResourcePools
Returns:
the set of ResourceType

validateAndMerge

public ResourcePools validateAndMerge(ResourcePools toBeUpdated)
Description copied from interface: ResourcePools
Get a copy of the current ResourcePools merged with another ResourcePools and validate that the updates to the contained ResourcePools are legal.

Specified by:
validateAndMerge in interface ResourcePools
Parameters:
toBeUpdated - the ResourcePools to merge with the current one.
Returns:
A merged and validated ResourcePools copy.

validateResourcePools

public static void validateResourcePools(java.util.Collection<? extends ResourcePool> pools)