Class CompositeCacheConfigurator
java.lang.Object
org.apache.commons.jcs3.engine.control.CompositeCacheConfigurator
This class configures JCS based on a properties object.
 
This class is based on the log4j class org.apache.log4j.PropertyConfigurator which was made by: "Luke Blanshard" <Luke@quiq.com>"Mark DONSZELMANN" <Mark.Donszelmann@cern.ch>"Anders Kristensen" <akristensen@dynamicsoft.com>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final String.attributesprotected static final Stringauxiliary prefixprotected static final String.cacheattributesprotected static final String.elementattributesstatic final Stringjcs.auxiliary.NAME.keymatcher=CLASSNAMEprotected static final Stringnormal region prefixprotected static final StringThe prefix of relevant system propertiesprotected static final Stringsystem region prefix. might not be used
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor for the CompositeCacheConfigurator object
- 
Method SummaryModifier and TypeMethodDescriptionprotected <K,V> CompositeCache<K, V> protected static voidAny property values will be replaced with system property values that match the key.protected <K,V> AuxiliaryCache<K, V> parseAuxiliary(Properties props, CompositeCacheManager ccm, String auxName, String regName) Get an aux cache for the listed aux for a region.protected ICompositeCacheAttributesparseCompositeCacheAttributes(Properties props, String regName, ICompositeCacheAttributes defaultCCAttr) Get an ICompositeCacheAttributes for the listed region.protected ICompositeCacheAttributesparseCompositeCacheAttributes(Properties props, String regName, ICompositeCacheAttributes defaultCCAttr, String regionPrefix) Get the main attributes for a region.protected IElementAttributesparseElementAttributes(Properties props, String regName, IElementAttributes defaultEAttr, String regionPrefix) Create the element attributes from the properties object for a cache region.protected <K> IKeyMatcher<K>parseKeyMatcher(Properties props, String auxPrefix) Creates a custom key matcher if one is defined.protected <K,V> CompositeCache<K, V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries) Create cache region.protected <K,V> CompositeCache<K, V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries, ICompositeCacheAttributes cca) Get all the properties for a region and configure its cache.protected <K,V> CompositeCache<K, V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries, ICompositeCacheAttributes cca, String regionPrefix) Get all the properties for a region and configure its cache.protected voidparseRegions(Properties props, CompositeCacheManager ccm) Parse region elements.protected voidparseSystemRegions(Properties props, CompositeCacheManager ccm) Create caches used internally.
- 
Field Details- 
SYSTEM_PROPERTY_KEY_PREFIXThe prefix of relevant system properties- See Also:
 
- 
REGION_PREFIXnormal region prefix- See Also:
 
- 
SYSTEM_REGION_PREFIXsystem region prefix. might not be used- See Also:
 
- 
AUXILIARY_PREFIXauxiliary prefix- See Also:
 
- 
ATTRIBUTE_PREFIX.attributes- See Also:
 
- 
CACHE_ATTRIBUTE_PREFIX.cacheattributes- See Also:
 
- 
ELEMENT_ATTRIBUTE_PREFIX.elementattributes- See Also:
 
- 
KEY_MATCHER_PREFIXjcs.auxiliary.NAME.keymatcher=CLASSNAMEjcs.auxiliary.NAME.keymatcher.attributes.CUSTOMPROPERTY=VALUE - See Also:
 
 
- 
- 
Constructor Details- 
CompositeCacheConfiguratorpublic CompositeCacheConfigurator()Constructor for the CompositeCacheConfigurator object
 
- 
- 
Method Details- 
parseSystemRegionsCreate caches used internally. System status gives them creation priority.- Parameters:
- props- Configuration properties
- ccm- Cache hub
 
- 
parseRegionsParse region elements.- Parameters:
- props- Configuration properties
- ccm- Cache hub
 
- 
parseRegionprotected <K,V> CompositeCache<K,V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries) Create cache region.- Parameters:
- props- Configuration properties
- ccm- Cache hub
- regName- Name of the cache region
- auxiliaries- Comma separated list of auxiliaries
- Returns:
- CompositeCache
 
- 
parseRegionprotected <K,V> CompositeCache<K,V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries, ICompositeCacheAttributes cca) Get all the properties for a region and configure its cache.This method tells the other parse method the name of the region prefix. - Parameters:
- props- Configuration properties
- ccm- Cache hub
- regName- Name of the cache region
- auxiliaries- Comma separated list of auxiliaries
- cca- Cache configuration
- Returns:
- CompositeCache
 
- 
parseRegionprotected <K,V> CompositeCache<K,V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries, ICompositeCacheAttributes cca, String regionPrefix) Get all the properties for a region and configure its cache.- Parameters:
- props- Configuration properties
- ccm- Cache hub
- regName- Name of the cache region
- auxiliaries- Comma separated list of auxiliaries
- cca- Cache configuration
- regionPrefix- Prefix for the region
- Returns:
- CompositeCache
 
- 
newCache
- 
parseCompositeCacheAttributesprotected ICompositeCacheAttributes parseCompositeCacheAttributes(Properties props, String regName, ICompositeCacheAttributes defaultCCAttr) Get an ICompositeCacheAttributes for the listed region.- Parameters:
- props- Configuration properties
- regName- the region name
- defaultCCAttr- the default cache attributes
- Returns:
- ICompositeCacheAttributes
 
- 
parseCompositeCacheAttributesprotected ICompositeCacheAttributes parseCompositeCacheAttributes(Properties props, String regName, ICompositeCacheAttributes defaultCCAttr, String regionPrefix) Get the main attributes for a region.- Parameters:
- props- Configuration properties
- regName- the region name
- defaultCCAttr- the default cache attributes
- regionPrefix- the region prefix
- Returns:
- ICompositeCacheAttributes
 
- 
parseElementAttributesprotected IElementAttributes parseElementAttributes(Properties props, String regName, IElementAttributes defaultEAttr, String regionPrefix) Create the element attributes from the properties object for a cache region.- Parameters:
- props- Configuration properties
- regName- the region name
- defaultEAttr- the default element attributes
- regionPrefix- the region prefix
- Returns:
- IElementAttributes
 
- 
parseAuxiliaryprotected <K,V> AuxiliaryCache<K,V> parseAuxiliary(Properties props, CompositeCacheManager ccm, String auxName, String regName) Get an aux cache for the listed aux for a region.- Parameters:
- props- the configuration properties
- ccm- Cache hub
- auxName- the name of the auxiliary cache
- regName- the name of the region.
- Returns:
- AuxiliaryCache
 
- 
overrideWithSystemPropertiesAny property values will be replaced with system property values that match the key.- Parameters:
- props-
 
- 
parseKeyMatcherCreates a custom key matcher if one is defined. Else, it uses the default.- Parameters:
- props-
- auxPrefix- - ex. AUXILIARY_PREFIX + auxName
- Returns:
- IKeyMatcher
 
 
-