Class AbstractDiskCacheAttributes
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributes
org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCacheAttributes
- All Implemented Interfaces:
Serializable
,Cloneable
,AuxiliaryCacheAttributes
,IDiskCacheAttributes
- Direct Known Subclasses:
BlockDiskCacheAttributes
,IndexedDiskCacheAttributes
,JDBCDiskCacheAttributes
public abstract class AbstractDiskCacheAttributes
extends AbstractAuxiliaryCacheAttributes
implements IDiskCacheAttributes
This has common attributes that any conceivable disk cache would need.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.commons.jcs3.auxiliary.disk.behavior.IDiskCacheAttributes
IDiskCacheAttributes.DiskLimitType
-
Field Summary
Fields inherited from interface org.apache.commons.jcs3.auxiliary.disk.behavior.IDiskCacheAttributes
MAX_PURGATORY_SIZE_DEFAULT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the diskPath attribute of the attributes objectint
Gets the maxKeySize attribute of the DiskCacheAttributes objectint
Get the amount of time in seconds we will wait for elements to move to disk during shutdown for a particular region.boolean
If this is true then remove all is not prohibited.void
setAllowRemoveAll
(boolean allowRemoveAll) If this is false, then remove all requests will not be honored.void
setDiskLimitType
(IDiskCacheAttributes.DiskLimitType diskLimitType) set the type of the limit of the cache sizevoid
setDiskLimitTypeName
(String diskLimitTypeName) Translates and stores String values of DiskLimitType Allowed values: "COUNT" and "SIZE"void
setDiskPath
(File diskPath) Sets the diskPath attribute of the DiskCacheAttributes objectvoid
setDiskPath
(String path) Sets the diskPath attribute of the DiskCacheAttributes objectvoid
setMaxPurgatorySize
(int maxPurgatorySize) Sets the maxPurgatorySize attribute of the DiskCacheAttributes objectvoid
setShutdownSpoolTimeLimit
(int shutdownSpoolTimeLimit) Sets the amount of time in seconds we will wait for elements to move to disk during shutdown for a particular region.toString()
Includes the common attributes for a debug message.Methods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributes
clone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributes
clone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
-
Constructor Details
-
AbstractDiskCacheAttributes
public AbstractDiskCacheAttributes()
-
-
Method Details
-
setDiskPath
Sets the diskPath attribute of the DiskCacheAttributes object- Specified by:
setDiskPath
in interfaceIDiskCacheAttributes
- Parameters:
path
- The new diskPath value
-
setDiskPath
Sets the diskPath attribute of the DiskCacheAttributes object- Parameters:
diskPath
- The new diskPath value
-
getDiskPath
Gets the diskPath attribute of the attributes object- Specified by:
getDiskPath
in interfaceIDiskCacheAttributes
- Returns:
- The diskPath value
-
getMaxPurgatorySize
Gets the maxKeySize attribute of the DiskCacheAttributes object- Specified by:
getMaxPurgatorySize
in interfaceIDiskCacheAttributes
- Returns:
- The maxPurgatorySize value
-
setMaxPurgatorySize
Sets the maxPurgatorySize attribute of the DiskCacheAttributes object- Specified by:
setMaxPurgatorySize
in interfaceIDiskCacheAttributes
- Parameters:
maxPurgatorySize
- The new maxPurgatorySize value
-
getShutdownSpoolTimeLimit
Get the amount of time in seconds we will wait for elements to move to disk during shutdown for a particular region.- Specified by:
getShutdownSpoolTimeLimit
in interfaceIDiskCacheAttributes
- Returns:
- the time in seconds.
-
setShutdownSpoolTimeLimit
Sets the amount of time in seconds we will wait for elements to move to disk during shutdown for a particular region.This is how long we give the event queue to empty.
The default is 60 seconds.
- Specified by:
setShutdownSpoolTimeLimit
in interfaceIDiskCacheAttributes
- Parameters:
shutdownSpoolTimeLimit
- the time in seconds
-
setAllowRemoveAll
Description copied from interface:IDiskCacheAttributes
If this is false, then remove all requests will not be honored.This provides a safety mechanism for the persistent store.
- Specified by:
setAllowRemoveAll
in interfaceIDiskCacheAttributes
- Parameters:
allowRemoveAll
- The allowRemoveAll to set.
-
isAllowRemoveAll
Description copied from interface:IDiskCacheAttributes
If this is true then remove all is not prohibited.- Specified by:
isAllowRemoveAll
in interfaceIDiskCacheAttributes
- Returns:
- Returns the allowRemoveAll.
-
toString
Includes the common attributes for a debug message. -
setDiskLimitType
Description copied from interface:IDiskCacheAttributes
set the type of the limit of the cache size- Specified by:
setDiskLimitType
in interfaceIDiskCacheAttributes
- Parameters:
diskLimitType
- COUNT - limit by count of the elements, SIZE, limit by sum of element's size
-
setDiskLimitTypeName
Description copied from interface:IDiskCacheAttributes
Translates and stores String values of DiskLimitType Allowed values: "COUNT" and "SIZE"- Specified by:
setDiskLimitTypeName
in interfaceIDiskCacheAttributes
-
getDiskLimitType
- Specified by:
getDiskLimitType
in interfaceIDiskCacheAttributes
- Returns:
- active DiskLimitType
-