此内容没有您所选择的语言版本。
15.2. Configure Locking (Library Mode)
For Library mode, the
locking
element and its parameters are set within the default
element and for each named cache, it occurs within the local-cache
element. The following is an example of this configuration:
Procedure 15.2. Configure Locking (Library Mode)
- The
concurrency-level
parameter specifies the concurrency level for the lock container. Set this value according to the number of concurrent threads interacting with the data grid. - The
isolation
parameter specifies the cache's isolation level. Valid isolation levels areREAD_COMMITTED
andREPEATABLE_READ
. For details about isolation levels, see Section 17.1, “About Isolation Levels” - The
acquire-timeout
parameter specifies time (in milliseconds) after which a lock acquisition attempt times out. - The
striping
parameter specifies whether a pool of shared locks are maintained for all entries that require locks. If set toFALSE
, locks are created for each entry in the cache. For details, see Section 16.1, “About Lock Striping” - The
write-skew
parameter is only valid if theisolation
is set toREPEATABLE_READ
. If this parameter is set toFALSE
, a disparity between a working entry and the underlying entry at write time results in the working entry overwriting the underlying entry. If the parameter is set toTRUE
, such conflicts (namely write skews) throw an exception. Thewrite-skew
parameter can be only used withOPTIMISTIC
transactions and it requires entry versioning to be enabled, withSIMPLE
versioning scheme.