Package com.tangosol.coherence.config
Class CacheConfig
java.lang.Object
com.tangosol.coherence.config.CacheConfig
A
CacheConfig
is the top-level container for Coherence Cache
Configuration, that of which is used at runtime to establish caches and
services.- Since:
- Coherence 12.1.2
- Author:
- pfm 2011.12.2
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCacheConfig
(ParameterResolver defaultParameterResolver) Construct aCacheConfig
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCacheMappingRegistry
(SchemeMappingRegistry registry) Add cache scheme mappings to theSchemeMappingRegistry
.void
Add topic scheme mappings to schemeSchemeMappingRegistry
if no mapping already exists for the same patter.findSchemeByCacheName
(String sCacheName) Find theCachingScheme
for the specified cache name.findSchemeBySchemeName
(String sSchemeName) Find theServiceScheme
given the scheme name.findSchemeByServiceName
(String sServiceName) Find theServiceScheme
given the service name.findSchemeByTopicName
(String sTopicName) Find theCachingScheme
for the specified topic name.Deprecated.Obtain theParameterResolver
to use for theCacheConfig
when no other is available or in context.Obtain the cache/topicResourceMappingRegistry
for theCacheConfig
.Obtain the scope name of theCacheConfig
.Obtain theServiceSchemeRegistry
for theCacheConfig
.void
setCacheMappingRegistry
(CacheMappingRegistry registry) Deprecated.As of Coherence 14.1.1, replaced byaddCacheMappingRegistry(SchemeMappingRegistry)
.void
setEventInterceptorBuilders
(List<NamedEventInterceptorBuilder> listBuilders) void
setScopeName
(String sScopeName) Deprecated.void
Set theServiceSchemeRegistry
for theCacheConfig
.validate
(ResourceRegistry registry) Validate the cache configuration.
-
Field Details
-
TOP_LEVEL_ELEMENT_NAME
Top-level element name.- See Also:
-
-
Constructor Details
-
CacheConfig
Construct aCacheConfig
.
-
-
Method Details
-
getScopeName
Obtain the scope name of theCacheConfig
. -
setScopeName
Deprecated.Set the scope name of thisCacheConfig
(which will be trimmed)- Parameters:
sScopeName
- the scope name
-
getEventInterceptorBuilders
- Returns:
- a List of NamedEventInterceptorBuilders or
null
if unspecified
-
setEventInterceptorBuilders
@Injectable("interceptors") public void setEventInterceptorBuilders(List<NamedEventInterceptorBuilder> listBuilders) - Parameters:
listBuilders
- the List of NamedEventInterceptorBuilders for this CacheConfig
-
getMappingRegistry
Obtain the cache/topicResourceMappingRegistry
for theCacheConfig
.- Returns:
- the cache/topic
ResourceMappingRegistry
- Since:
- Coherence 14.1.1
-
getCacheMappingRegistry
Deprecated.As of Coherence 14.1.1, replaced bygetMappingRegistry()
.Obtain theCacheMappingRegistry
for theCacheConfig
.- Returns:
- the
CacheMappingRegistry
-
setCacheMappingRegistry
Deprecated.As of Coherence 14.1.1, replaced byaddCacheMappingRegistry(SchemeMappingRegistry)
.Set theCacheMappingRegistry
.- Parameters:
registry
- theCacheMappingRegistry
-
addCacheMappingRegistry
@Injectable("caching-scheme-mapping") public void addCacheMappingRegistry(SchemeMappingRegistry registry) Add cache scheme mappings to theSchemeMappingRegistry
.- Parameters:
registry
- theSchemeMappingRegistry
- Since:
- Coherence 14.1.1
-
addRegistrySchemeMapping
@Injectable("topic-scheme-mapping") public void addRegistrySchemeMapping(SchemeMappingRegistry registry) Add topic scheme mappings to schemeSchemeMappingRegistry
if no mapping already exists for the same patter.- Parameters:
registry
- theSchemeMappingRegistry
- Since:
- Coherence 14.1.1
-
getServiceSchemeRegistry
Obtain theServiceSchemeRegistry
for theCacheConfig
.- Returns:
- the
ServiceSchemeRegistry
-
setServiceSchemeRegistry
Set theServiceSchemeRegistry
for theCacheConfig
.- Parameters:
registry
- theServiceSchemeRegistry
-
findSchemeByCacheName
Find theCachingScheme
for the specified cache name.- Parameters:
sCacheName
- the cache name- Returns:
- the
CachingScheme
ornull
if not found
-
findSchemeByTopicName
Find theCachingScheme
for the specified topic name.- Parameters:
sTopicName
- the topic name- Returns:
- the
NamedTopicScheme
ornull
if not found - Since:
- Coherence 14.1.1
-
findSchemeByServiceName
Find theServiceScheme
given the service name.- Parameters:
sServiceName
- the service name to match- Returns:
- the
ServiceScheme
or null
-
findSchemeBySchemeName
Find theServiceScheme
given the scheme name.- Parameters:
sSchemeName
- the scheme name to match- Returns:
- the
ServiceScheme
or null
-
getDefaultParameterResolver
Obtain theParameterResolver
to use for theCacheConfig
when no other is available or in context.- Returns:
- the default
ParameterResolver
-
validate
Validate the cache configuration.- Parameters:
registry
- the ResourceRegistry associated with this configuration.- Returns:
- this object
-
getMappingRegistry()
.