public class CompositeCacheConfigurator extends Object
This class is based on the log4j class org.apache.log4j.PropertyConfigurator which was made by:
"Luke Blanshard"
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_MATCHER_PREFIX
jcs.auxiliary.NAME.keymatcher=CLASSNAME
jcs.auxiliary.NAME.keymatcher.attributes.CUSTOMPROPERTY=VALUE
|
| Constructor and Description |
|---|
CompositeCacheConfigurator(CompositeCacheManager ccMgr)
Constructor for the CompositeCacheConfigurator object
|
| Modifier and Type | Method and Description |
|---|---|
void |
doConfigure(Properties properties)
Configure cache for properties object.
|
protected void |
doConfigure(String configFileName)
Configure cached for file name.
|
protected <K,V> AuxiliaryCache<K,V> |
parseAuxiliary(Properties props,
String auxName,
String regName)
Get an aux cache for the listed aux for a region.
|
protected ICompositeCacheAttributes |
parseCompositeCacheAttributes(Properties props,
String regName)
Get an ICompositeCacheAttributes for the listed region.
|
protected ICompositeCacheAttributes |
parseCompositeCacheAttributes(Properties props,
String regName,
String regionPrefix)
Get the main attributes for a region.
|
protected IElementAttributes |
parseElementAttributes(Properties props,
String regName,
String regionPrefix)
Create the element attributes from the properties object for a cache region.
|
static <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,
String regName,
String value)
Create cache region.
|
protected <K,V> CompositeCache<K,V> |
parseRegion(Properties props,
String regName,
String value,
ICompositeCacheAttributes cca)
Get all the properties for a region and configure its cache.
|
protected <K,V> CompositeCache<K,V> |
parseRegion(Properties props,
String regName,
String value,
ICompositeCacheAttributes cca,
String regionPrefix)
Get all the properties for a region and configure its cache.
|
protected <K,V> void |
parseRegions(Properties props)
Parse region elements.
|
protected <K,V> void |
parseSystemRegions(Properties props)
Create caches used internally.
|
protected void |
setDefaultAuxValues(Properties props)
Set the default aux list for new caches.
|
protected void |
setDefaultCompositeCacheAttributes(Properties props)
Set the default CompositeCacheAttributes for new caches.
|
protected void |
setDefaultElementAttributes(Properties props)
Set the default ElementAttributes for new caches.
|
public static final String KEY_MATCHER_PREFIX
jcs.auxiliary.NAME.keymatcher.attributes.CUSTOMPROPERTY=VALUE
public CompositeCacheConfigurator(CompositeCacheManager ccMgr)
ccMgr - protected void doConfigure(String configFileName)
This is only used for testing. The manager handles the translation of a file into a properties object.
configFileName - public void doConfigure(Properties properties)
This method proceeds in several steps:
properties - protected void setDefaultAuxValues(Properties props)
props - protected void setDefaultCompositeCacheAttributes(Properties props)
props - protected void setDefaultElementAttributes(Properties props)
props - protected <K,V> void parseSystemRegions(Properties props)
props - protected <K,V> void parseRegions(Properties props)
props - protected <K,V> CompositeCache<K,V> parseRegion(Properties props, String regName, String value)
props - regName - value - protected <K,V> CompositeCache<K,V> parseRegion(Properties props, String regName, String value, ICompositeCacheAttributes cca)
This method tells the other parse method the name of the region prefix.
props - regName - value - cca - protected <K,V> CompositeCache<K,V> parseRegion(Properties props, String regName, String value, ICompositeCacheAttributes cca, String regionPrefix)
props - regName - value - cca - regionPrefix - protected ICompositeCacheAttributes parseCompositeCacheAttributes(Properties props, String regName)
props - regName - protected ICompositeCacheAttributes parseCompositeCacheAttributes(Properties props, String regName, String regionPrefix)
props - regName - regionPrefix - protected IElementAttributes parseElementAttributes(Properties props, String regName, String regionPrefix)
props - regName - regionPrefix - protected <K,V> AuxiliaryCache<K,V> parseAuxiliary(Properties props, String auxName, String regName)
props - the configuration propertiesauxName - the name of the auxiliary cacheregName - the name of the region.public static <K> IKeyMatcher<K> parseKeyMatcher(Properties props, String auxPrefix)
props - auxPrefix - - ex. AUXILIARY_PREFIX + auxNameCopyright © 2002–2015 The Apache Software Foundation. All rights reserved.