public interface ResourcePools
resource pools
a cache has at its disposal to store its mappings.Modifier and Type | Method and Description |
---|---|
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 ResourcePool s are legal. |
ResourcePool getPoolForResource(ResourceType resourceType)
ResourcePool
based on its type.resourceType
- the type of resource the pool is tracking.ResourcePool
, or null if there is no pool tracking the requested type.java.util.Set<ResourceType> getResourceTypeSet()
ResourceType
of all the pools present in the ResourcePoolsResourceType
ResourcePools validateAndMerge(ResourcePools toBeUpdated) throws java.lang.IllegalArgumentException, java.lang.UnsupportedOperationException
ResourcePools
merged with another ResourcePools
and validate that
the updates to the contained ResourcePool
s are legal.toBeUpdated
- the ResourcePools
to merge with the current one.ResourcePools
copy.java.lang.IllegalArgumentException
- thrown when an illegal resource value is being given, for instance a negative
size.java.lang.UnsupportedOperationException
- thrown when an unsupported update is requested, for instance trying to change
the ResourceUnit
.