org.infinispan.loaders.jdbc
Class AbstractNonDelegatingJdbcCacheStoreConfig

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.config.PluggableConfigurationComponent
              extended by org.infinispan.loaders.AbstractCacheLoaderConfig
                  extended by org.infinispan.loaders.AbstractCacheStoreConfig
                      extended by org.infinispan.loaders.LockSupportCacheStoreConfig
                          extended by org.infinispan.loaders.jdbc.AbstractJdbcCacheStoreConfig
                              extended by org.infinispan.loaders.jdbc.AbstractNonDelegatingJdbcCacheStoreConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, CacheLoaderConfig, CacheStoreConfig
Direct Known Subclasses:
JdbcBinaryCacheStoreConfig, JdbcStringBasedCacheStoreConfig

public abstract class AbstractNonDelegatingJdbcCacheStoreConfig
extends AbstractJdbcCacheStoreConfig

An abstract configuration for JDBC cache stores which have support for locking.

Version:
4.1
Author:
Manik Surtani
See Also:
Serialized Form

Field Summary
static int DEFAULT_CONCURRENCY_LEVEL
           
static int DEFAULT_LOCK_ACQUISITION_TIMEOUT
           
protected  boolean manageConnectionFactory
           
protected  TableManipulation tableManipulation
           
 
Fields inherited from class org.infinispan.loaders.jdbc.AbstractJdbcCacheStoreConfig
connectionFactoryConfig
 
Fields inherited from class org.infinispan.loaders.AbstractCacheStoreConfig
async, fetchPersistentState, ignoreModifications, purgeOnStartup, purgerThreads, purgeSynchronously, singletonStore
 
Fields inherited from class org.infinispan.loaders.AbstractCacheLoaderConfig
cacheLoaderClassName
 
Fields inherited from class org.infinispan.config.PluggableConfigurationComponent
properties
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
EMPTY_PROPERTIES, log, overriddenConfigurationElements
 
Constructor Summary
AbstractNonDelegatingJdbcCacheStoreConfig()
           
 
Method Summary
 AbstractNonDelegatingJdbcCacheStoreConfig clone()
           
 int getBatchSize()
           
 String getDatabaseType()
           
 int getFetchSize()
           
 TableManipulation getTableManipulation()
           
 boolean isManageConnectionFactory()
          If this method returns false, then the connection factory should not be created by the JdbcStringBasedCacheStore, but will be injected through JdbcStringBasedCacheStore.doConnectionFactoryInitialization(org.infinispan.loaders.jdbc.connectionfactory.ConnectionFactory)
 void setBatchSize(int batchSize)
           
 void setCacheName(String cacheName)
          Sets the name of the table where data will be stored.
 void setCreateTableOnStart(boolean createTableOnStart)
           
 void setDatabaseType(String dbType)
          Sets the database dialect.
 void setDataColumnName(String dataColumnName)
          Sets the name of the column where the StoredEntry will be binary stored.
 void setDataColumnType(String dataColumnType)
          Sets the type of the column where data will be binary stored.
 void setDropTableOnExit(boolean dropTableOnExit)
           
 void setFetchSize(int fetchSize)
           
 void setIdColumnName(String idColumnName)
          Sets the name of the column where the id will be stored.
 void setIdColumnType(String idColumnType)
          sql equivalent for java's String.
 void setTableManipulation(TableManipulation tableManipulation)
           
 void setTimestampColumnName(String timestampColumnName)
          Sets the name of the column where the timestamp (Long in java) will be stored.
 void setTimestampColumnType(String timestampColumnType)
          Sets the prefix for the name of the table where the data will be stored.
 String toString()
           
 
Methods inherited from class org.infinispan.loaders.jdbc.AbstractJdbcCacheStoreConfig
getConnectionFactoryConfig, setConnectionFactoryClass, setConnectionUrl, setDatasourceJndiLocation, setDriverClass, setPassword, setUserName
 
Methods inherited from class org.infinispan.loaders.LockSupportCacheStoreConfig
getLockAcquistionTimeout, getLockConcurrencyLevel, setLockAcquistionTimeout, setLockConcurrencyLevel
 
Methods inherited from class org.infinispan.loaders.AbstractCacheStoreConfig
accept, equals, equalsExcludingProperties, getAsyncStoreConfig, getPurgerThreads, getSingletonStoreConfig, hashCode, hashCodeExcludingProperties, isFetchPersistentState, isIgnoreModifications, isPurgeOnStartup, isPurgeSynchronously, setAsyncStoreConfig, setFetchPersistentState, setIgnoreModifications, setPurgeOnStartup, setPurgerThreads, setPurgeSynchronously, setSingletonStoreConfig
 
Methods inherited from class org.infinispan.loaders.AbstractCacheLoaderConfig
getCacheLoaderClassName, setCacheLoaderClassName
 
Methods inherited from class org.infinispan.config.PluggableConfigurationComponent
getProperties, setProperties, setProperties
 
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
hasComponentStarted, inject
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, uc
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.infinispan.loaders.CacheLoaderConfig
getCacheLoaderClassName, setCacheLoaderClassName
 

Field Detail

DEFAULT_CONCURRENCY_LEVEL

public static final int DEFAULT_CONCURRENCY_LEVEL
See Also:
Constant Field Values

DEFAULT_LOCK_ACQUISITION_TIMEOUT

public static final int DEFAULT_LOCK_ACQUISITION_TIMEOUT
See Also:
Constant Field Values

tableManipulation

protected TableManipulation tableManipulation

manageConnectionFactory

protected boolean manageConnectionFactory
Constructor Detail

AbstractNonDelegatingJdbcCacheStoreConfig

public AbstractNonDelegatingJdbcCacheStoreConfig()
Method Detail

setCacheName

public void setCacheName(String cacheName)
Sets the name of the table where data will be stored.


setIdColumnName

public void setIdColumnName(String idColumnName)
Sets the name of the column where the id will be stored. The id is obtained through:
   key2StringMapper.getStringMapping(storedEntry.getKey());
 
Mandatory.


setDataColumnName

public void setDataColumnName(String dataColumnName)
Sets the name of the column where the StoredEntry will be binary stored. Mandatory.


setTimestampColumnName

public void setTimestampColumnName(String timestampColumnName)
Sets the name of the column where the timestamp (Long in java) will be stored. Mandatory.


setTimestampColumnType

public void setTimestampColumnType(String timestampColumnType)
Sets the prefix for the name of the table where the data will be stored. "_" will be appended to this prefix in order to enforce unique table names for each cache.


getTableManipulation

public TableManipulation getTableManipulation()

setIdColumnType

public void setIdColumnType(String idColumnType)
sql equivalent for java's String. Mandatory.


setDataColumnType

public void setDataColumnType(String dataColumnType)
Sets the type of the column where data will be binary stored. BLOB-like type, DBMS dependent. Mandatory.


setDropTableOnExit

public void setDropTableOnExit(boolean dropTableOnExit)

setCreateTableOnStart

public void setCreateTableOnStart(boolean createTableOnStart)

isManageConnectionFactory

public boolean isManageConnectionFactory()
If this method returns false, then the connection factory should not be created by the JdbcStringBasedCacheStore, but will be injected through JdbcStringBasedCacheStore.doConnectionFactoryInitialization(org.infinispan.loaders.jdbc.connectionfactory.ConnectionFactory)


setTableManipulation

public void setTableManipulation(TableManipulation tableManipulation)

setFetchSize

public void setFetchSize(int fetchSize)
See Also:
TableManipulation.getFetchSize()

setBatchSize

public void setBatchSize(int batchSize)
See Also:
TableManipulation.getBatchSize()

getFetchSize

public int getFetchSize()
See Also:
TableManipulation.getFetchSize()

getBatchSize

public int getBatchSize()
See Also:
TableManipulation.getBatchSize()

getDatabaseType

public String getDatabaseType()

setDatabaseType

public void setDatabaseType(String dbType)
Sets the database dialect. Valid types are reflected in the DatabaseType enum. If unspecified, will attempt to "guess" appropriate dialect from the JDBC driver specified.

Parameters:
dbType -

clone

public AbstractNonDelegatingJdbcCacheStoreConfig clone()
Specified by:
clone in interface CloneableConfigurationComponent
Specified by:
clone in interface CacheLoaderConfig
Overrides:
clone in class AbstractJdbcCacheStoreConfig

toString

public String toString()
Overrides:
toString in class AbstractJdbcCacheStoreConfig

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.