Package org.apache.commons.jcs3.engine
Class CompositeCacheAttributes
java.lang.Object
org.apache.commons.jcs3.engine.CompositeCacheAttributes
- All Implemented Interfaces:
Serializable,Cloneable,ICompositeCacheAttributes
The CompositeCacheAttributes defines the general cache region settings. If a region is not
explicitly defined in the cache.ccf then it inherits the cache default settings.
If all the default attributes are not defined in the default region definition in the cache.ccf, the hard coded defaults will be used.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.commons.jcs3.engine.behavior.ICompositeCacheAttributes
ICompositeCacheAttributes.DiskUsagePattern -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the CompositeCacheAttributes object -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone objectGets the cacheName attribute of the CompositeCacheAttributes objectlongIf UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.intGets the maxObjects attribute of the CompositeCacheAttributes objectintIf UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.Gets the memoryCacheName attribute of the CompositeCacheAttributes objectlongIf UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.intNumber to send to disk at the time when memory is full.booleanGets the useDisk attribute of the CompositeCacheAttributes objectbooleanGets the useLateral attribute of the CompositeCacheAttributes objectbooleanWhether the memory cache should perform background memory shrinkage.booleanGets the useRemote attribute of the CompositeCacheAttributes objectvoidSets the cacheName attribute of the CompositeCacheAttributes objectvoidsetDiskUsagePattern(ICompositeCacheAttributes.DiskUsagePattern diskUsagePattern) By default this is SWAP_ONLY.voidsetDiskUsagePatternName(String diskUsagePatternName) Translates the name to the disk usage pattern short value.voidsetMaxMemoryIdleTimeSeconds(long seconds) If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.voidsetMaxObjects(int maxObjs) Sets the maxObjects attribute of the CompositeCacheAttributes objectvoidsetMaxSpoolPerRun(int maxSpoolPerRun) If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.voidSets the memoryCacheName attribute of the CompositeCacheAttributes objectvoidsetShrinkerIntervalSeconds(long seconds) If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.voidsetSpoolChunkSize(int spoolChunkSize) Number to send to disk at a time.voidsetUseDisk(boolean useDisk) Sets the useDisk attribute of the CompositeCacheAttributes objectvoidsetUseLateral(boolean b) Sets the useLateral attribute of the CompositeCacheAttributes objectvoidsetUseMemoryShrinker(boolean useShrinker) Whether the memory cache should perform background memory shrinkage.voidsetUseRemote(boolean useRemote) Sets the useRemote attribute of the CompositeCacheAttributes objecttoString()Dumps the core attributes.
-
Constructor Details
-
CompositeCacheAttributes
public CompositeCacheAttributes()Constructor for the CompositeCacheAttributes object
-
-
Method Details
-
setMaxObjects
Sets the maxObjects attribute of the CompositeCacheAttributes object- Specified by:
setMaxObjectsin interfaceICompositeCacheAttributes- Parameters:
maxObjs- The new maxObjects value
-
getMaxObjects
Gets the maxObjects attribute of the CompositeCacheAttributes object- Specified by:
getMaxObjectsin interfaceICompositeCacheAttributes- Returns:
- The maxObjects value
-
setUseDisk
Sets the useDisk attribute of the CompositeCacheAttributes object- Specified by:
setUseDiskin interfaceICompositeCacheAttributes- Parameters:
useDisk- The new useDisk value
-
isUseDisk
Gets the useDisk attribute of the CompositeCacheAttributes object- Specified by:
isUseDiskin interfaceICompositeCacheAttributes- Returns:
- The useDisk value
-
setUseLateral
Sets the useLateral attribute of the CompositeCacheAttributes object- Specified by:
setUseLateralin interfaceICompositeCacheAttributes- Parameters:
b- The new useLateral value
-
isUseLateral
Gets the useLateral attribute of the CompositeCacheAttributes object- Specified by:
isUseLateralin interfaceICompositeCacheAttributes- Returns:
- The useLateral value
-
setUseRemote
Sets the useRemote attribute of the CompositeCacheAttributes object- Specified by:
setUseRemotein interfaceICompositeCacheAttributes- Parameters:
useRemote- The new useRemote value
-
isUseRemote
Gets the useRemote attribute of the CompositeCacheAttributes object- Specified by:
isUseRemotein interfaceICompositeCacheAttributes- Returns:
- The useRemote value
-
setCacheName
Sets the cacheName attribute of the CompositeCacheAttributes object- Specified by:
setCacheNamein interfaceICompositeCacheAttributes- Parameters:
s- The new cacheName value
-
getCacheName
Gets the cacheName attribute of the CompositeCacheAttributes object- Specified by:
getCacheNamein interfaceICompositeCacheAttributes- Returns:
- The cacheName value
-
setMemoryCacheName
Sets the memoryCacheName attribute of the CompositeCacheAttributes object- Specified by:
setMemoryCacheNamein interfaceICompositeCacheAttributes- Parameters:
s- The new memoryCacheName value
-
getMemoryCacheName
Gets the memoryCacheName attribute of the CompositeCacheAttributes object- Specified by:
getMemoryCacheNamein interfaceICompositeCacheAttributes- Returns:
- The memoryCacheName value
-
setUseMemoryShrinker
Whether the memory cache should perform background memory shrinkage.- Specified by:
setUseMemoryShrinkerin interfaceICompositeCacheAttributes- Parameters:
useShrinker- The new UseMemoryShrinker value
-
isUseMemoryShrinker
Whether the memory cache should perform background memory shrinkage.- Specified by:
isUseMemoryShrinkerin interfaceICompositeCacheAttributes- Returns:
- The UseMemoryShrinker value
-
setMaxMemoryIdleTimeSeconds
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.- Specified by:
setMaxMemoryIdleTimeSecondsin interfaceICompositeCacheAttributes- Parameters:
seconds- The new MaxMemoryIdleTimeSeconds value
-
getMaxMemoryIdleTimeSeconds
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space.- Specified by:
getMaxMemoryIdleTimeSecondsin interfaceICompositeCacheAttributes- Returns:
- The MaxMemoryIdleTimeSeconds value
-
setShrinkerIntervalSeconds
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This sets the shrinker interval.- Specified by:
setShrinkerIntervalSecondsin interfaceICompositeCacheAttributes- Parameters:
seconds- The new ShrinkerIntervalSeconds value
-
getShrinkerIntervalSeconds
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This gets the shrinker interval.- Specified by:
getShrinkerIntervalSecondsin interfaceICompositeCacheAttributes- Returns:
- The ShrinkerIntervalSeconds value
-
setMaxSpoolPerRun
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This sets the maximum number of items to spool per run.If the value is -1, then there is no limit to the number of items to be spooled.
- Specified by:
setMaxSpoolPerRunin interfaceICompositeCacheAttributes- Parameters:
maxSpoolPerRun- The new maxSpoolPerRun value
-
getMaxSpoolPerRun
If UseMemoryShrinker is true the memory cache should auto-expire elements to reclaim space. This gets the maximum number of items to spool per run.- Specified by:
getMaxSpoolPerRunin interfaceICompositeCacheAttributes- Returns:
- The maxSpoolPerRun value
-
setDiskUsagePattern
By default this is SWAP_ONLY.- Specified by:
setDiskUsagePatternin interfaceICompositeCacheAttributes- Parameters:
diskUsagePattern- The diskUsagePattern to set.
-
setDiskUsagePatternName
Translates the name to the disk usage pattern short value.The allowed values are SWAP and UPDATE.
- Specified by:
setDiskUsagePatternNamein interfaceICompositeCacheAttributes- Parameters:
diskUsagePatternName- The diskUsagePattern to set.
-
getSpoolChunkSize
Number to send to disk at the time when memory is full.- Specified by:
getSpoolChunkSizein interfaceICompositeCacheAttributes- Returns:
- int
-
setSpoolChunkSize
Number to send to disk at a time.- Specified by:
setSpoolChunkSizein interfaceICompositeCacheAttributes- Parameters:
spoolChunkSize-
-
getDiskUsagePattern
- Specified by:
getDiskUsagePatternin interfaceICompositeCacheAttributes- Returns:
- Returns the diskUsagePattern.
-
toString
Dumps the core attributes. -
clone
Description copied from interface:ICompositeCacheAttributesClone object- Specified by:
clonein interfaceICompositeCacheAttributes- Overrides:
clonein classObject- See Also:
-