此内容没有您所选择的语言版本。
18.3. Cache Store Configuration Details (Remote Client-Server Mode)
The following tables contain details about the configuration elements and parameters for cache store elements in JBoss Data Grid's Remote Client-Server mode:
The local-cache Element
- The
nameparameter of thelocal-cacheattribute is used to specify a name for the cache. - The
statisticsparameter specifies whether statistics are enabled at the container level. Enable or disable statistics on a per-cache basis by setting thestatisticsattribute tofalse.
The file-store Element
- The
nameparameter of thefile-storeelement is used to specify a name for the file store. - The
passivationparameter determines whether entries in the cache are passivated (true) or if the cache store retains a copy of the contents in memory (false). - The
purgeparameter specifies whether or not the cache store is purged when it is started. Valid values for this parameter aretrueandfalse. - The
sharedparameter is used when multiple cache instances share a cache store. This parameter can be set to prevent multiple cache instances writing the same modification multiple times. Valid values for this parameter aretrueandfalse. However, thesharedparameter is not recommended for the LevelDB cache store because this cache store cannot be shared. - The
relative-toproperty is the directory where thefile-storestores the data. It is used to define a named path. - The
pathproperty is the name of the file where the data is stored. It is a relative path name that is appended to the value of therelative-toproperty to determine the complete path. - The
maxEntriesparameter provides maximum number of entries allowed. The default value is -1 for unlimited entries. - The
fetch-stateparameter when set to true fetches the persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled. Persistent state transfer with a shared cache store does not make sense, as the same persistent store that provides the data will just end up receiving it. Therefore, if a shared cache store is used, the cache does not allow a persistent state transfer even if a cache store has this property set totrue. It is recommended to set this property to true only in a clustered environment. The default value for this parameter is false. - The
preloadparameter when set to true, loads the data stored in the cache store into memory when the cache starts. However, setting this parameter to true affects the performance as the startup time is increased. The default value for this parameter is false. - The
singletonparameter enables a singleton store cache store. SingletonStore is a delegating cache store used when only one instance in a cluster can interact with the underlying store. However,singletonparameter is not recommended forfile-store.
The store Element
- The
classparameter specifies the class name of the cache store implementation.
The property Element
- The
nameparameter specifies the name of the property. - The
valueparameter specifies the value assigned to the property.
The remote-store Element
- The
cacheparameter defines the name for the remote cache. If left undefined, the default cache is used instead. - The
socket-timeoutparameter sets whether the value defined inSO_TIMEOUT(in milliseconds) applies to remote Hot Rod servers on the specified timeout. A timeout value of0indicates an infinite timeout. - The
tcp-no-delaysets whetherTCP_NODELAYapplies on socket connections to remote Hot Rod servers. - The
hotrod-wrappingsets whether a wrapper is required for Hot Rod on the remote store.
The remote-server Element
- The
outbound-socket-bindingparameter sets the outbound socket binding for the remote server.
The binary-keyed-jdbc-store, string-keyed-jdbc-store, and mixed-keyed-jdbc-store Elements
- The
datasourceparameter defines the name of a JNDI for the datasource. - The
passivationparameter determines whether entries in the cache are passivated (true) or if the cache store retains a copy of the contents in memory (false). - The
preloadparameter specifies whether to load entries into the cache during start up. Valid values for this parameter aretrueandfalse. - The
purgeparameter specifies whether or not the cache store is purged when it is started. Valid values for this parameter aretrueandfalse. - The
sharedparameter is used when multiple cache instances share a cache store. This parameter can be set to prevent multiple cache instances writing the same modification multiple times. Valid values for this parameter aretrueandfalse. - The
singletonparameter enables a singleton store cache store. SingletonStore is a delegating cache store used when only one instance in a cluster can interact with the underlying store
The binary-keyed-table and string-keyed-table Elements
- The
prefixparameter specifies a prefix string for the database table name.
The id-column, data-column, and timestamp-column Elements
- The
nameparameter specifies the name of the database column. - The
typeparameter specifies the type of the database column.
The leveldb-store Element
- The
pathparameter The directory within the path specified in therelative-toparameter where the cache state is stored. If undefined, the path defaults to the cache container name. - The
passivationparameter specifies whether passivation is enabled for the LevelDB cache store. Valid values aretrueandfalse. - The
purgeparameter specifies whether the cache store is purged when it starts up. Valid values aretrueandfalse.