public class CacheMapping extends ResourceMapping
CacheMapping captures configuration information for a pattern-match-based mapping from a proposed
NamedCache name to a caching scheme.
In addition to the mapping between a cache name and a caching scheme, each CacheMapping retains a
ParameterResolver (representing user-provided parameters) to be during the realization of the said cache
and scheme. (This allows individual mappings to be parameterized)
Lastly CacheMappings also provide a mechanism to associate specific strongly typed resources
with each mapping at runtime. This provides a flexible and dynamic mechanism to associate further configuration
information with caches.
Pattern Matching Semantics: The only wildcard permitted for pattern matching with cache names is the "*" and it may only be used at the end of a cache name.
For example, the following cache name patterns are valid:
"*" and something-*, but *-something is invalid.
| Modifier and Type | Field and Description |
|---|---|
boolean |
m_fFederated
The flag to indicate if this
CacheMapping is federated. |
| Constructor and Description |
|---|
CacheMapping(String sCacheNamePattern,
String sCachingSchemeName)
Construct a
CacheMapping for caches that will use rawtypes by default. |
| Modifier and Type | Method and Description |
|---|---|
String |
getCacheNamePattern()
Deprecated.
As of Coherence 14.1.1, use
ResourceMapping.getNamePattern(). |
String |
getCachingSchemeName()
Deprecated.
As of Coherence 14.1.1, use
ResourceMapping.getSchemeName(). |
String |
getConfigElementName()
Obtain the xml element name of this mapping.
|
String |
getKeyClassName()
Obtains the name of the key class for
NamedCaches using this CacheMapping. |
String |
getValueClassName()
Obtains the name of the value class for
NamedCaches using this CacheMapping. |
boolean |
isFederated()
Check if this CacheMapping is federated.
|
CacheMapping |
setFederated(boolean fIsFederated)
Set true if this cache mapping is for federated caches.
|
CacheMapping |
setInternal(boolean fIsInternal)
Set the flag to indicate if this mapping is for internal resources
used by the service.
|
void |
setKeyClassName(String sKeyClassName)
Sets the name of the key class for
NamedCaches using this CacheMapping. |
void |
setValueClassName(String sValueClassName)
Sets the name of the value class for
NamedCaches using this CacheMapping. |
boolean |
usesRawTypes()
Determines if the
CacheMapping is configured to use raw-types
(ie: no type checking or constraints) |
void |
validateScheme(Scheme scheme)
Determine whether the specified schem is valid
for this mapping type.
|
getEventInterceptorBuilders, getNamePattern, getNameUsing, getParameterResolver, getResourceRegistry, getSchemeName, getSubMappings, getValue, getValue, getWildcardMatch, isForName, isInternal, setEventInterceptorBuilders, setParameterResolver, usesWildcardpublic boolean m_fFederated
CacheMapping is federated.public CacheMapping(String sCacheNamePattern, String sCachingSchemeName)
CacheMapping for caches that will use rawtypes by default.sCacheNamePattern - the pattern that maps cache names to caching schemessCachingSchemeName - the name of the caching scheme to which caches matching this
CacheMapping will be associatedpublic String getConfigElementName()
ResourceMappinggetConfigElementName in class ResourceMappingpublic void validateScheme(Scheme scheme)
ResourceMappingvalidateScheme in class ResourceMappingscheme - the scheme to validate@Injectable(value="federated") public CacheMapping setFederated(boolean fIsFederated)
fIsFederated - true if this cache is to be federatedpublic boolean isFederated()
public CacheMapping setInternal(boolean fIsInternal)
ResourceMappingsetInternal in class ResourceMappingfIsInternal - true if this is for internal resourcepublic String getCacheNamePattern()
ResourceMapping.getNamePattern().CacheMapping.public String getCachingSchemeName()
ResourceMapping.getSchemeName().NamedCaches that match this CacheMapping.public String getKeyClassName()
NamedCaches using this CacheMapping.null if rawtypes are being usedpublic String getValueClassName()
NamedCaches using this CacheMapping.null if rawtypes are being usedpublic boolean usesRawTypes()
CacheMapping is configured to use raw-types
(ie: no type checking or constraints)true if using rawtypes, false otherwise@Injectable(value="key-type") public void setKeyClassName(String sKeyClassName)
NamedCaches using this CacheMapping.sKeyClassName - the name of the key class or null if rawtypes are being used@Injectable(value="value-type") public void setValueClassName(String sValueClassName)
NamedCaches using this CacheMapping.sValueClassName - the name of the value class or null if rawtypes are being used