org.apache.jcs.auxiliary.disk
Class AbstractDiskCacheAttributes

java.lang.Object
  extended by org.apache.jcs.auxiliary.AbstractAuxiliaryCacheAttributes
      extended by org.apache.jcs.auxiliary.disk.AbstractDiskCacheAttributes
All Implemented Interfaces:
Serializable, Cloneable, AuxiliaryCacheAttributes, IDiskCacheAttributes
Direct Known Subclasses:
BlockDiskCacheAttributes, FileDiskCacheAttributes, IndexedDiskCacheAttributes, JDBCDiskCacheAttributes

public abstract class AbstractDiskCacheAttributes
extends AbstractAuxiliaryCacheAttributes
implements IDiskCacheAttributes

This has common attributes that any conceivable disk cache would need.

See Also:
Serialized Form

Field Summary
protected  String diskPath
          path to disk
protected  int maxPurgatorySize
          default to 5000
protected  int shutdownSpoolTimeLimit
          This default determines how long the shutdown will wait for the key spool and data defrag to finish.
 
Fields inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCacheAttributes
cacheName, eventQueuePoolName, eventQueueType, name
 
Fields inherited from interface org.apache.jcs.auxiliary.disk.behavior.IDiskCacheAttributes
MAX_PURGATORY_SIZE_DEFUALT
 
Fields inherited from interface org.apache.jcs.auxiliary.AuxiliaryCacheAttributes
POOLED_QUEUE_TYPE, SINGLE_QUEUE_TYPE
 
Constructor Summary
AbstractDiskCacheAttributes()
           
 
Method Summary
 AuxiliaryCacheAttributes copy()
          Simple clone.
 String getDiskPath()
          Gets the diskPath attribute of the attributes object
 int getMaxPurgatorySize()
          Gets the maxKeySize attribute of the DiskCacheAttributes object
 int getShutdownSpoolTimeLimit()
          Get the amount of time in seconds we will wait for elements to move to disk during shutdown for a particular region.
 boolean isAllowRemoveAll()
          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 setDiskPath(String path)
          Sets the diskPath attribute of the IJISPCacheAttributes object
 void setMaxPurgatorySize(int maxPurgatorySize)
          Sets the maxPurgatorySize attribute of the DiskCacheAttributes object
 void 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.
 String toString()
          Includes the common attributes for a debug message.
 
Methods inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCacheAttributes
getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jcs.auxiliary.AuxiliaryCacheAttributes
getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
 

Field Detail

diskPath

protected String diskPath
path to disk


maxPurgatorySize

protected int maxPurgatorySize
default to 5000


shutdownSpoolTimeLimit

protected int shutdownSpoolTimeLimit
This default determines how long the shutdown will wait for the key spool and data defrag to finish.

Constructor Detail

AbstractDiskCacheAttributes

public AbstractDiskCacheAttributes()
Method Detail

setDiskPath

public void setDiskPath(String path)
Sets the diskPath attribute of the IJISPCacheAttributes object

Specified by:
setDiskPath in interface IDiskCacheAttributes
Parameters:
path - The new diskPath value

getDiskPath

public String getDiskPath()
Gets the diskPath attribute of the attributes object

Specified by:
getDiskPath in interface IDiskCacheAttributes
Returns:
The diskPath value

getMaxPurgatorySize

public int getMaxPurgatorySize()
Gets the maxKeySize attribute of the DiskCacheAttributes object

Specified by:
getMaxPurgatorySize in interface IDiskCacheAttributes
Returns:
The maxPurgatorySize value

setMaxPurgatorySize

public void setMaxPurgatorySize(int maxPurgatorySize)
Sets the maxPurgatorySize attribute of the DiskCacheAttributes object

Specified by:
setMaxPurgatorySize in interface IDiskCacheAttributes
Parameters:
maxPurgatorySize - The new maxPurgatorySize value

getShutdownSpoolTimeLimit

public int 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 interface IDiskCacheAttributes
Returns:
the time in seconds.

setShutdownSpoolTimeLimit

public void 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.

This is how long we give the event queue to empty.

The default is 60 seconds.

Specified by:
setShutdownSpoolTimeLimit in interface IDiskCacheAttributes
Parameters:
shutdownSpoolTimeLimit - the time in seconds

copy

public AuxiliaryCacheAttributes copy()
Simple clone.

Specified by:
copy in interface AuxiliaryCacheAttributes
Returns:
AuxiliaryCacheAttributes

setAllowRemoveAll

public void setAllowRemoveAll(boolean allowRemoveAll)
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 interface IDiskCacheAttributes
Parameters:
allowRemoveAll - The allowRemoveAll to set.

isAllowRemoveAll

public boolean isAllowRemoveAll()
Description copied from interface: IDiskCacheAttributes
If this is true then remove all is not prohibited.

Specified by:
isAllowRemoveAll in interface IDiskCacheAttributes
Returns:
Returns the allowRemoveAll.

toString

public String toString()
Includes the common attributes for a debug message.

Overrides:
toString in class Object
Returns:
String


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.