Package com.tangosol.coherence.config
Class CacheConfig
- java.lang.Object
-
- com.tangosol.coherence.config.CacheConfig
-
public class CacheConfig extends Object
ACacheConfig
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 Modifier and Type Field Description static String
TOP_LEVEL_ELEMENT_NAME
Top-level element name.
-
Constructor Summary
Constructors Constructor Description CacheConfig(ParameterResolver defaultParameterResolver)
Construct aCacheConfig
.
-
Method Summary
-
-
-
Field Detail
-
TOP_LEVEL_ELEMENT_NAME
public static final String TOP_LEVEL_ELEMENT_NAME
Top-level element name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CacheConfig
public CacheConfig(ParameterResolver defaultParameterResolver)
Construct aCacheConfig
.
-
-
Method Detail
-
getScopeName
public String getScopeName()
Obtain the scope name of theCacheConfig
.
-
setScopeName
@Injectable("scope-name") @Deprecated public void setScopeName(String sScopeName)
Deprecated.Set the scope name of thisCacheConfig
(which will be trimmed)- Parameters:
sScopeName
- the scope name
-
getEventInterceptorBuilders
public List<NamedEventInterceptorBuilder> 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
public ResourceMappingRegistry getMappingRegistry()
Obtain the cache/topicResourceMappingRegistry
for theCacheConfig
.- Returns:
- the cache/topic
ResourceMappingRegistry
- Since:
- Coherence 14.1.1
-
getCacheMappingRegistry
public CacheMappingRegistry getCacheMappingRegistry()
Deprecated.As of Coherence 14.1.1, replaced bygetMappingRegistry()
.Obtain theCacheMappingRegistry
for theCacheConfig
.- Returns:
- the
CacheMappingRegistry
-
setCacheMappingRegistry
public void setCacheMappingRegistry(CacheMappingRegistry registry)
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
public ServiceSchemeRegistry getServiceSchemeRegistry()
Obtain theServiceSchemeRegistry
for theCacheConfig
.- Returns:
- the
ServiceSchemeRegistry
-
setServiceSchemeRegistry
@Injectable("caching-schemes") public void setServiceSchemeRegistry(ServiceSchemeRegistry registry)
Set theServiceSchemeRegistry
for theCacheConfig
.- Parameters:
registry
- theServiceSchemeRegistry
-
findSchemeByCacheName
public CachingScheme findSchemeByCacheName(String sCacheName)
Find theCachingScheme
for the specified cache name.- Parameters:
sCacheName
- the cache name- Returns:
- the
CachingScheme
ornull
if not found
-
findSchemeByTopicName
public NamedTopicScheme findSchemeByTopicName(String sTopicName)
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
public ServiceScheme findSchemeByServiceName(String sServiceName)
Find theServiceScheme
given the service name.- Parameters:
sServiceName
- the service name to match- Returns:
- the
ServiceScheme
or null
-
findSchemeBySchemeName
public ServiceScheme findSchemeBySchemeName(String sSchemeName)
Find theServiceScheme
given the scheme name.- Parameters:
sSchemeName
- the scheme name to match- Returns:
- the
ServiceScheme
or null
-
getDefaultParameterResolver
public ParameterResolver getDefaultParameterResolver()
Obtain theParameterResolver
to use for theCacheConfig
when no other is available or in context.- Returns:
- the default
ParameterResolver
-
validate
public CacheConfig validate(ResourceRegistry registry)
Validate the cache configuration.- Parameters:
registry
- the ResourceRegistry associated with this configuration.- Returns:
- this object
-
-