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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCacheConfig(ParameterResolver defaultParameterResolver) Construct aCacheConfig. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCacheMappingRegistry(SchemeMappingRegistry registry) Add cache scheme mappings to theSchemeMappingRegistry.voidAdd topic scheme mappings to schemeSchemeMappingRegistryif no mapping already exists for the same patter.findSchemeByCacheName(String sCacheName) Find theCachingSchemefor the specified cache name.findSchemeBySchemeName(String sSchemeName) Find theServiceSchemegiven the scheme name.findSchemeByServiceName(String sServiceName) Find theServiceSchemegiven the service name.findSchemeByTopicName(String sTopicName) Find theCachingSchemefor the specified topic name.Deprecated.Obtain theParameterResolverto use for theCacheConfigwhen no other is available or in context.Obtain the cache/topicResourceMappingRegistryfor theCacheConfig.Obtain the scope name of theCacheConfig.Obtain theServiceSchemeRegistryfor theCacheConfig.voidsetCacheMappingRegistry(CacheMappingRegistry registry) Deprecated.As of Coherence 14.1.1, replaced byaddCacheMappingRegistry(SchemeMappingRegistry).voidsetEventInterceptorBuilders(List<NamedEventInterceptorBuilder> listBuilders) voidsetScopeName(String sScopeName) Deprecated.voidSet theServiceSchemeRegistryfor 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
nullif unspecified
-
setEventInterceptorBuilders
@Injectable("interceptors") public void setEventInterceptorBuilders(List<NamedEventInterceptorBuilder> listBuilders) - Parameters:
listBuilders- the List of NamedEventInterceptorBuilders for this CacheConfig
-
getMappingRegistry
Obtain the cache/topicResourceMappingRegistryfor theCacheConfig.- Returns:
- the cache/topic
ResourceMappingRegistry - Since:
- Coherence 14.1.1
-
getCacheMappingRegistry
Deprecated.As of Coherence 14.1.1, replaced bygetMappingRegistry().Obtain theCacheMappingRegistryfor 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 schemeSchemeMappingRegistryif no mapping already exists for the same patter.- Parameters:
registry- theSchemeMappingRegistry- Since:
- Coherence 14.1.1
-
getServiceSchemeRegistry
Obtain theServiceSchemeRegistryfor theCacheConfig.- Returns:
- the
ServiceSchemeRegistry
-
setServiceSchemeRegistry
Set theServiceSchemeRegistryfor theCacheConfig.- Parameters:
registry- theServiceSchemeRegistry
-
findSchemeByCacheName
Find theCachingSchemefor the specified cache name.- Parameters:
sCacheName- the cache name- Returns:
- the
CachingSchemeornullif not found
-
findSchemeByTopicName
Find theCachingSchemefor the specified topic name.- Parameters:
sTopicName- the topic name- Returns:
- the
NamedTopicSchemeornullif not found - Since:
- Coherence 14.1.1
-
findSchemeByServiceName
Find theServiceSchemegiven the service name.- Parameters:
sServiceName- the service name to match- Returns:
- the
ServiceSchemeor null
-
findSchemeBySchemeName
Find theServiceSchemegiven the scheme name.- Parameters:
sSchemeName- the scheme name to match- Returns:
- the
ServiceSchemeor null
-
getDefaultParameterResolver
Obtain theParameterResolverto use for theCacheConfigwhen 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().