public class CompositeCacheConfigurator
extends java.lang.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 java.lang.String |
KEY_MATCHER_PREFIX
jcs.auxiliary.NAME.keymatcher=CLASSNAME
|
Constructor and Description |
---|
CompositeCacheConfigurator(CompositeCacheManager ccMgr)
Constructor for the CompositeCacheConfigurator object
|
Modifier and Type | Method and Description |
---|---|
void |
doConfigure(java.util.Properties properties)
Configure cache for properties object.
|
protected void |
doConfigure(java.lang.String configFileName)
Configure cached for file name.
|
protected AuxiliaryCache |
parseAuxiliary(CompositeCache cache,
java.util.Properties props,
java.lang.String auxName,
java.lang.String regName)
Get an aux cache for the listed aux for a region.
|
protected ICompositeCacheAttributes |
parseCompositeCacheAttributes(java.util.Properties props,
java.lang.String regName)
Get an ICompositeCacheAttributes for the listed region.
|
protected ICompositeCacheAttributes |
parseCompositeCacheAttributes(java.util.Properties props,
java.lang.String regName,
java.lang.String regionPrefix)
Get the main attributes for a region.
|
protected IElementAttributes |
parseElementAttributes(java.util.Properties props,
java.lang.String regName,
java.lang.String regionPrefix)
Create the element attributes from the properties object for a cache region.
|
static IKeyMatcher |
parseKeyMatcher(java.util.Properties props,
java.lang.String auxPrefix)
Creates a custom key matcher if one is defined.
|
protected CompositeCache |
parseRegion(java.util.Properties props,
java.lang.String regName,
java.lang.String value)
Create cache region.
|
protected CompositeCache |
parseRegion(java.util.Properties props,
java.lang.String regName,
java.lang.String value,
ICompositeCacheAttributes cca)
Get all the properties for a region and configure its cache.
|
protected CompositeCache |
parseRegion(java.util.Properties props,
java.lang.String regName,
java.lang.String value,
ICompositeCacheAttributes cca,
java.lang.String regionPrefix)
Get all the properties for a region and configure its cache.
|
protected void |
parseRegions(java.util.Properties props)
Parse region elements.
|
protected void |
parseSystemRegions(java.util.Properties props)
Create caches used internally.
|
protected void |
setDefaultAuxValues(java.util.Properties props)
Set the default aux list for new caches.
|
protected void |
setDefaultCompositeCacheAttributes(java.util.Properties props)
Set the default CompositeCacheAttributes for new caches.
|
protected void |
setDefaultElementAttributes(java.util.Properties props)
Set the default ElementAttributes for new caches.
|
public static final java.lang.String KEY_MATCHER_PREFIX
jcs.auxiliary.NAME.keymatcher.attributes.CUSTOMPROPERTY=VALUE
public CompositeCacheConfigurator(CompositeCacheManager ccMgr)
ccMgr
- protected void doConfigure(java.lang.String configFileName)
This is only used for testing. The manager handles the translation of a file into a properties object.
configFileName
- public void doConfigure(java.util.Properties properties)
This method proceeds in several steps:
properties
- protected void setDefaultAuxValues(java.util.Properties props)
props
- protected void setDefaultCompositeCacheAttributes(java.util.Properties props)
props
- protected void setDefaultElementAttributes(java.util.Properties props)
props
- protected void parseSystemRegions(java.util.Properties props)
props
- protected void parseRegions(java.util.Properties props)
props
- protected CompositeCache parseRegion(java.util.Properties props, java.lang.String regName, java.lang.String value)
props
- regName
- value
- protected CompositeCache parseRegion(java.util.Properties props, java.lang.String regName, java.lang.String value, ICompositeCacheAttributes cca)
This method tells the other parse method the name of the region prefix.
props
- regName
- value
- cca
- protected CompositeCache parseRegion(java.util.Properties props, java.lang.String regName, java.lang.String value, ICompositeCacheAttributes cca, java.lang.String regionPrefix)
props
- regName
- value
- cca
- regionPrefix
- protected ICompositeCacheAttributes parseCompositeCacheAttributes(java.util.Properties props, java.lang.String regName)
props
- regName
- protected ICompositeCacheAttributes parseCompositeCacheAttributes(java.util.Properties props, java.lang.String regName, java.lang.String regionPrefix)
props
- regName
- regionPrefix
- protected IElementAttributes parseElementAttributes(java.util.Properties props, java.lang.String regName, java.lang.String regionPrefix)
props
- regName
- regionPrefix
- protected AuxiliaryCache parseAuxiliary(CompositeCache cache, java.util.Properties props, java.lang.String auxName, java.lang.String regName)
cache
- the cache managerprops
- the configuration propertiesauxName
- the name of the auxiliary cacheregName
- the name of the region.public static IKeyMatcher parseKeyMatcher(java.util.Properties props, java.lang.String auxPrefix)
props
- auxPrefix
- - ex. AUXILIARY_PREFIX + auxNameCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.