Package com.tangosol.coherence.config
Class CacheConfig
- java.lang.Object
-
- com.tangosol.coherence.config.CacheConfig
-
public class CacheConfig extends Object
ACacheConfigis 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 StringTOP_LEVEL_ELEMENT_NAMETop-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
nullif 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/topicResourceMappingRegistryfor 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 theCacheMappingRegistryfor 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 schemeSchemeMappingRegistryif no mapping already exists for the same patter.- Parameters:
registry- theSchemeMappingRegistry- Since:
- Coherence 14.1.1
-
getServiceSchemeRegistry
public ServiceSchemeRegistry getServiceSchemeRegistry()
Obtain theServiceSchemeRegistryfor theCacheConfig.- Returns:
- the
ServiceSchemeRegistry
-
setServiceSchemeRegistry
@Injectable("caching-schemes") public void setServiceSchemeRegistry(ServiceSchemeRegistry registry)
Set theServiceSchemeRegistryfor theCacheConfig.- Parameters:
registry- theServiceSchemeRegistry
-
findSchemeByCacheName
public CachingScheme findSchemeByCacheName(String sCacheName)
Find theCachingSchemefor the specified cache name.- Parameters:
sCacheName- the cache name- Returns:
- the
CachingSchemeornullif not found
-
findSchemeByTopicName
public NamedTopicScheme findSchemeByTopicName(String sTopicName)
Find theCachingSchemefor the specified topic name.- Parameters:
sTopicName- the topic name- Returns:
- the
NamedTopicSchemeornullif not found - Since:
- Coherence 14.1.1
-
findSchemeByServiceName
public ServiceScheme findSchemeByServiceName(String sServiceName)
Find theServiceSchemegiven the service name.- Parameters:
sServiceName- the service name to match- Returns:
- the
ServiceSchemeor null
-
findSchemeBySchemeName
public ServiceScheme findSchemeBySchemeName(String sSchemeName)
Find theServiceSchemegiven the scheme name.- Parameters:
sSchemeName- the scheme name to match- Returns:
- the
ServiceSchemeor null
-
getDefaultParameterResolver
public ParameterResolver getDefaultParameterResolver()
Obtain theParameterResolverto use for theCacheConfigwhen 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
-
-