org.apache.jcs.auxiliary.disk.jdbc
Class JDBCDiskCacheAttributes

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

public class JDBCDiskCacheAttributes
extends AbstractDiskCacheAttributes

The configurator will set these values based on what is in the cache.ccf file.

Author:
Aaron Smuts
See Also:
Serialized Form

Field Summary
static int DEFAULT_MAX_ACTIVE
          This is the default limit on the maximum number of active connections.
static int DEFAULT_SHRINKER_INTERVAL_SECONDS
          This is the default setting for the cleanup routine.
 
Fields inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCacheAttributes
diskPath, maxPurgatorySize, shutdownSpoolTimeLimit
 
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
JDBCDiskCacheAttributes()
           
 
Method Summary
 java.lang.String getConnectionPoolName()
           
 java.lang.String getDatabase()
           
 java.lang.String getDriverClassName()
           
 int getMaxActive()
           
 java.lang.String getPassword()
           
 int getShrinkerIntervalSeconds()
           
 java.lang.String getTableName()
           
 java.lang.String getUrl()
           
 java.lang.String getUserName()
           
 boolean isTestBeforeInsert()
           
 boolean isUseDiskShrinker()
           
 void setConnectionPoolName(java.lang.String connectionPoolName)
           
 void setDatabase(java.lang.String database)
          This is appended to the url.
 void setDriverClassName(java.lang.String driverClassName)
           
 void setMaxActive(int maxActive)
           
 void setPassword(java.lang.String password)
           
 void setShrinkerIntervalSeconds(int shrinkerIntervalSecondsArg)
           
 void setTableName(java.lang.String tableName)
           
 void setTestBeforeInsert(boolean testBeforeInsert)
          If this is true then the disk cache will check to see if the item already exists in the database.
 void setUrl(java.lang.String url)
           
 void setUseDiskShrinker(boolean useDiskShrinker)
           
 void setUserName(java.lang.String userName)
           
 java.lang.String toString()
          For debugging.
 
Methods inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCacheAttributes
copy, getDiskPath, getMaxPurgatorySize, getShutdownSpoolTimeLimit, isAllowRemoveAll, setAllowRemoveAll, setDiskPath, setMaxPurgatorySize, setShutdownSpoolTimeLimit
 
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

DEFAULT_MAX_ACTIVE

public static final int DEFAULT_MAX_ACTIVE
This is the default limit on the maximum number of active connections.

See Also:
Constant Field Values

DEFAULT_SHRINKER_INTERVAL_SECONDS

public static final int DEFAULT_SHRINKER_INTERVAL_SECONDS
This is the default setting for the cleanup routine.

See Also:
Constant Field Values
Constructor Detail

JDBCDiskCacheAttributes

public JDBCDiskCacheAttributes()
Method Detail

setUserName

public void setUserName(java.lang.String userName)
Parameters:
userName - The userName to set.

getUserName

public java.lang.String getUserName()
Returns:
Returns the userName.

setPassword

public void setPassword(java.lang.String password)
Parameters:
password - The password to set.

getPassword

public java.lang.String getPassword()
Returns:
Returns the password.

setUrl

public void setUrl(java.lang.String url)
Parameters:
url - The url to set.

getUrl

public java.lang.String getUrl()
Returns:
Returns the url.

setDatabase

public void setDatabase(java.lang.String database)
This is appended to the url.

Parameters:
database - The database to set.

getDatabase

public java.lang.String getDatabase()
Returns:
Returns the database.

setDriverClassName

public void setDriverClassName(java.lang.String driverClassName)
Parameters:
driverClassName - The driverClassName to set.

getDriverClassName

public java.lang.String getDriverClassName()
Returns:
Returns the driverClassName.

setTableName

public void setTableName(java.lang.String tableName)
Parameters:
tableName - The tableName to set.

getTableName

public java.lang.String getTableName()
Returns:
Returns the tableName.

setTestBeforeInsert

public void setTestBeforeInsert(boolean testBeforeInsert)
If this is true then the disk cache will check to see if the item already exists in the database. If it is false, it will try to insert. If the insert fails it will try to update.

Parameters:
testBeforeInsert - The testBeforeInsert to set.

isTestBeforeInsert

public boolean isTestBeforeInsert()
Returns:
Returns the testBeforeInsert.

setMaxActive

public void setMaxActive(int maxActive)
Parameters:
maxActive - The maxActive to set.

getMaxActive

public int getMaxActive()
Returns:
Returns the maxActive.

setShrinkerIntervalSeconds

public void setShrinkerIntervalSeconds(int shrinkerIntervalSecondsArg)
Parameters:
shrinkerIntervalSecondsArg - The shrinkerIntervalSeconds to set.

getShrinkerIntervalSeconds

public int getShrinkerIntervalSeconds()
Returns:
Returns the shrinkerIntervalSeconds.

setUseDiskShrinker

public void setUseDiskShrinker(boolean useDiskShrinker)
Parameters:
useDiskShrinker - The useDiskShrinker to set.

isUseDiskShrinker

public boolean isUseDiskShrinker()
Returns:
Returns the useDiskShrinker.

setConnectionPoolName

public void setConnectionPoolName(java.lang.String connectionPoolName)
Parameters:
connectionPoolName - the connectionPoolName to set

getConnectionPoolName

public java.lang.String getConnectionPoolName()
Returns:
the connectionPoolName

toString

public java.lang.String toString()
For debugging.

Overrides:
toString in class AbstractDiskCacheAttributes
Returns:
debug string with most of the properties.


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