org.infinispan.loaders.jdbc.stringbased
Class JdbcStringBasedCacheStoreConfig

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.stringbased.JdbcStringBasedCacheStoreConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, CacheLoaderConfig, CacheStoreConfig

public class JdbcStringBasedCacheStoreConfig
extends LockSupportCacheStoreConfig

Configuration for JdbcStringBasedCacheStore cache store.

Author:
Mircea.Markus@jboss.com
See Also:
Key2StringMapper, Serialized Form

Field Summary
 
Fields inherited from class org.infinispan.loaders.LockSupportCacheStoreConfig
DEFAULT_CONCURRENCY_LEVEL, DEFAULT_LOCK_ACQUISITION_TIMEOUT
 
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
JdbcStringBasedCacheStoreConfig()
           
JdbcStringBasedCacheStoreConfig(boolean manageConnectionFactory)
           
JdbcStringBasedCacheStoreConfig(ConnectionFactoryConfig connectionFactoryConfig, TableManipulation tableManipulation)
           
 
Method Summary
 JdbcStringBasedCacheStoreConfig clone()
           
 int getBatchSize()
           
 ConnectionFactoryConfig getConnectionFactoryConfig()
           
 int getFetchSize()
           
 Key2StringMapper getKey2StringMapper()
           
 TableManipulation getTableManipulation()
           
 void setBatchSize(int batchSize)
           
 void setCacheName(String cacheName)
          Sets the name of the table where data will be stored.
 void setConnectionFactoryClass(String connectionFactoryClass)
           
 void setConnectionUrl(String connectionUrl)
          Jdbc connection string for connecting to the database.
 void setCreateTableOnStart(boolean createTableOnStart)
           
 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 setDatasourceJndiLocation(String location)
           
 void setDriverClass(String driverClassName)
          The name of the driver used for connecting to the database.
 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 setKey2StringMapperClass(String className)
          Name of the class implementing Key2StringMapper.
 void setPassword(String password)
          Database username's password.
 void setStringsTableNamePrefix(String stringsTableNamePrefix)
          Sets the prefix for the name of the table where the data will be stored.
 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.
 void setUserName(String userName)
          Database username.
 
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, toString
 
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
 

Constructor Detail

JdbcStringBasedCacheStoreConfig

public JdbcStringBasedCacheStoreConfig(ConnectionFactoryConfig connectionFactoryConfig,
                                       TableManipulation tableManipulation)

JdbcStringBasedCacheStoreConfig

public JdbcStringBasedCacheStoreConfig()

JdbcStringBasedCacheStoreConfig

public JdbcStringBasedCacheStoreConfig(boolean manageConnectionFactory)
Method Detail

getKey2StringMapper

public Key2StringMapper getKey2StringMapper()

setKey2StringMapperClass

public void setKey2StringMapperClass(String className)
Name of the class implementing Key2StringMapper. The default value is DefaultKey2StringMapper

See Also:
Key2StringMapper

setStringsTableNamePrefix

public void setStringsTableNamePrefix(String stringsTableNamePrefix)
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.


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.


setConnectionFactoryClass

public void setConnectionFactoryClass(String connectionFactoryClass)

getConnectionFactoryConfig

public ConnectionFactoryConfig getConnectionFactoryConfig()

getTableManipulation

public TableManipulation getTableManipulation()

setConnectionUrl

public void setConnectionUrl(String connectionUrl)
Jdbc connection string for connecting to the database. Mandatory.


setUserName

public void setUserName(String userName)
Database username.


setDatasourceJndiLocation

public void setDatasourceJndiLocation(String location)

setPassword

public void setPassword(String password)
Database username's password.


setDriverClass

public void setDriverClass(String driverClassName)
The name of the driver used for connecting to the database. Mandatory, will be loaded before initiating the first connection.


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)

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()

clone

public JdbcStringBasedCacheStoreConfig clone()
Specified by:
clone in interface CloneableConfigurationComponent
Specified by:
clone in interface CacheLoaderConfig
Overrides:
clone in class AbstractCacheStoreConfig

Google Analytics

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