此内容没有您所选择的语言版本。
15.2.2. JdbcStringBasedStore Configuration (Library Mode)
The following is a sample configuration for the
JdbcStringBasedStore
:
Procedure 15.5. Configure JdbcStringBasedStore in Library Mode
The stringKeyedJdbcStore Element
ThestringKeyedJdbcStore
element uses the following parameters to configure the cache store:- The
fetchPersistentState
parameter determines whether the persistent state is fetched when joining a cluster. Set this totrue
if using a replication and invalidation in a clustered environment. Additionally, if multiple cache stores are chained, only one cache store can have this property enabled. If a shared cache store is used, the cache does not allow a persistent state transfer despite this property being set totrue
. ThefetchPersistentState
parameter isfalse
by default. - The
ignoreModifications
parameter determines whether operations that modify the cache (e.g. put, remove, clear, store, etc.) do not affect the cache store. As a result, the cache store can become out of sync with the cache. - The
purgeOnStartup
parameter specifies whether the cache is purged when initially started. - The
key2StringMapper
parameter specifies the class name of the Key2StringMapper used to map keys to strings for the database tables.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The connectionPool Element
TheconnectionPool
element specifies a connection pool for the JDBC driver using the following parameters:- The
connectionUrl
parameter specifies the JDBC driver-specific connection URL. - The
username
parameter contains the user name used to connect via theconnectionUrl
. - The
driverClass
parameter specifies the class name of the driver used to connect to the database.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The stringKeyedTable Element
Add thestringKeyedTable
element defines the table that stores cache entries. It uses the following parameters to configure the cache store:- The
dropOnExit
parameter specifies whether the database tables are dropped upon shutdown. - The
createOnStart
parameter specifies whether the database tables are created by the store on startup. - The
prefix
parameter specifies a prefix string for the database table name.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The idColumn Element
TheidColumn
element defines the column where the cache key or bucket ID is stored. It uses the following parameters:- Use the
name
parameter to specify the name of the ID column. - Use the
type
parameter to specify the type of the ID column.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The dataColumn Element
ThedataColumn
element specifies the column where the cache entry or bucket is stored.- Use the
name
parameter to specify the name of the database column. - Use the
type
parameter to specify the type of the database column.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The timestampColumn Element
ThetimestampColumn
element specifies the column where the time stamp of the cache entry or bucket is stored.- Use the
name
parameter to specify the name of the column used. - Use the
type
parameter to specify the type of the column used.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow