public class CompositeCacheConfigurator extends 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>
Modifier and Type | Field and Description |
---|---|
protected static String |
ATTRIBUTE_PREFIX
.attributes
|
protected static String |
AUXILIARY_PREFIX
auxiliary prefix
|
protected static String |
CACHE_ATTRIBUTE_PREFIX
.cacheattributes
|
protected static String |
ELEMENT_ATTRIBUTE_PREFIX
.elementattributes
|
static String |
KEY_MATCHER_PREFIX
jcs.auxiliary.NAME.keymatcher=CLASSNAME
jcs.auxiliary.NAME.keymatcher.attributes.CUSTOMPROPERTY=VALUE
|
protected static String |
REGION_PREFIX
normal region prefix
|
protected static String |
SYSTEM_PROPERTY_KEY_PREFIX
The prefix of relevant system properties
|
protected static String |
SYSTEM_REGION_PREFIX
system region prefix. might not be used
|
Constructor and Description |
---|
CompositeCacheConfigurator()
Constructor for the CompositeCacheConfigurator object
|
Modifier and Type | Method and Description |
---|---|
protected <K,V> CompositeCache<K,V> |
newCache(ICompositeCacheAttributes cca,
IElementAttributes ea) |
protected static void |
overrideWithSystemProperties(Properties props)
Any 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 ICompositeCacheAttributes |
parseCompositeCacheAttributes(Properties props,
String regName,
ICompositeCacheAttributes defaultCCAttr)
Get an ICompositeCacheAttributes for the listed region.
|
protected ICompositeCacheAttributes |
parseCompositeCacheAttributes(Properties props,
String regName,
ICompositeCacheAttributes defaultCCAttr,
String regionPrefix)
Get the main attributes for a region.
|
protected IElementAttributes |
parseElementAttributes(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 void |
parseRegions(Properties props,
CompositeCacheManager ccm)
Parse region elements.
|
protected void |
parseSystemRegions(Properties props,
CompositeCacheManager ccm)
Create caches used internally.
|
protected static final String SYSTEM_PROPERTY_KEY_PREFIX
protected static final String REGION_PREFIX
protected static final String SYSTEM_REGION_PREFIX
protected static final String AUXILIARY_PREFIX
protected static final String ATTRIBUTE_PREFIX
protected static final String CACHE_ATTRIBUTE_PREFIX
protected static final String ELEMENT_ATTRIBUTE_PREFIX
public static final String KEY_MATCHER_PREFIX
jcs.auxiliary.NAME.keymatcher.attributes.CUSTOMPROPERTY=VALUE
public CompositeCacheConfigurator()
protected void parseSystemRegions(Properties props, CompositeCacheManager ccm)
props
- Configuration propertiesccm
- Cache hubprotected void parseRegions(Properties props, CompositeCacheManager ccm)
props
- Configuration propertiesccm
- Cache hubprotected <K,V> CompositeCache<K,V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries)
props
- Configuration propertiesccm
- Cache hubregName
- Name of the cache regionauxiliaries
- Comma separated list of auxiliariesprotected <K,V> CompositeCache<K,V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries, ICompositeCacheAttributes cca)
This method tells the other parse method the name of the region prefix.
props
- Configuration propertiesccm
- Cache hubregName
- Name of the cache regionauxiliaries
- Comma separated list of auxiliariescca
- Cache configurationprotected <K,V> CompositeCache<K,V> parseRegion(Properties props, CompositeCacheManager ccm, String regName, String auxiliaries, ICompositeCacheAttributes cca, String regionPrefix)
props
- Configuration propertiesccm
- Cache hubregName
- Name of the cache regionauxiliaries
- Comma separated list of auxiliariescca
- Cache configurationregionPrefix
- Prefix for the regionprotected <K,V> CompositeCache<K,V> newCache(ICompositeCacheAttributes cca, IElementAttributes ea)
protected ICompositeCacheAttributes parseCompositeCacheAttributes(Properties props, String regName, ICompositeCacheAttributes defaultCCAttr)
props
- Configuration propertiesregName
- the region namedefaultCCAttr
- the default cache attributesprotected ICompositeCacheAttributes parseCompositeCacheAttributes(Properties props, String regName, ICompositeCacheAttributes defaultCCAttr, String regionPrefix)
props
- Configuration propertiesregName
- the region namedefaultCCAttr
- the default cache attributesregionPrefix
- the region prefixprotected IElementAttributes parseElementAttributes(Properties props, String regName, IElementAttributes defaultEAttr, String regionPrefix)
props
- Configuration propertiesregName
- the region namedefaultEAttr
- the default element attributesregionPrefix
- the region prefixprotected <K,V> AuxiliaryCache<K,V> parseAuxiliary(Properties props, CompositeCacheManager ccm, String auxName, String regName)
props
- the configuration propertiesccm
- Cache hubauxName
- the name of the auxiliary cacheregName
- the name of the region.protected static void overrideWithSystemProperties(Properties props)
props
- protected <K> IKeyMatcher<K> parseKeyMatcher(Properties props, String auxPrefix)
props
- auxPrefix
- - ex. AUXILIARY_PREFIX + auxNameCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.