ResourceMappingRegistry.public class CacheMappingRegistry extends Object implements Iterable<CacheMapping>
CacheMappingRegistry provides a mechanism manage a collection
of CacheMappings, together with the ability to search the registry for
said CacheMappings, possibly using wild-cards.
CacheMappingRegistrys are Iterable, the order of iteration
being that in which the CacheMappings where added to the said
CacheMappingRegistry.
| Constructor and Description |
|---|
CacheMappingRegistry()
Deprecated.
Construct a
CacheMappingRegistry. |
CacheMappingRegistry(ResourceMappingRegistry registry)
Deprecated.
CacheMappingRegistry delegates to
ResourceMappingRegistry. |
| Modifier and Type | Method and Description |
|---|---|
CacheMapping |
findCacheMapping(String sCacheName)
Deprecated.
Attempts to find the
CacheMapping that matches the specified
cache name. |
ResourceMappingRegistry |
getMappingRegistry()
Deprecated.
Get the underlying
ResourceMappingRegistry. |
Iterator<CacheMapping> |
iterator()
Deprecated.
|
void |
register(CacheMapping cacheMapping)
Deprecated.
Registers a
CacheMapping with the CacheMappingRegistry. |
int |
size()
Deprecated.
Determines the number of
CacheMappings in the CacheMappingRegistry. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic CacheMappingRegistry()
CacheMappingRegistry.public CacheMappingRegistry(ResourceMappingRegistry registry)
ResourceMappingRegistry.registry - delegate resource registry containing CacheMappingpublic Iterator<CacheMapping> iterator()
iterator in interface Iterable<CacheMapping>public void register(CacheMapping cacheMapping) throws IllegalArgumentException
CacheMapping with the CacheMappingRegistry.cacheMapping - the CacheMapping to registerIllegalArgumentException - if a CacheMapping with the same
pattern has already been registeredpublic CacheMapping findCacheMapping(String sCacheName)
CacheMapping that matches the specified
cache name.
The matching algorithm first attempts to find an exact match of a
CacheMapping with the provided cache name. Should that fail,
all of the currently registered wild-carded CacheMappings are
searched to find a match (in the order in which they were registered),
with the most specific (longest match) being returned if there are
multiple matches.
sCacheName - the cache namenull if a CacheMapping could not be located
for the specified cache namepublic int size()
CacheMappings in the CacheMappingRegistry.CacheMappingspublic ResourceMappingRegistry getMappingRegistry()
ResourceMappingRegistry.