此内容没有您所选择的语言版本。

14.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 namedCache element. The following is an example of this configuration:

Procedure 14.2. Configure Locking (Library Mode)

<infinispan>
	<!-- Other configuration elements here -->
	<default>
		<locking concurrencyLevel="${VALUE}"
			isolationLevel="${LEVEL}"
			lockAcquisitionTimeout="${TIME}"
			useLockStriping="${TRUE/FALSE}"
			writeSkewCheck="${TRUE/FALSE}" />
Copy to Clipboard Toggle word wrap
  1. The concurrencyLevel parameter specifies the concurrency level for the lock container. Set this value according to the number of concurrent threads interacting with the data grid.
  2. The isolationLevel parameter specifies the cache's isolation level. Valid isolation levels are READ_COMMITTED and REPEATABLE_READ. For details about isolation levels, see Section 16.1, “About Isolation Levels”
  3. The lockAcquisitionTimeout parameter specifies time (in milliseconds) after which a lock acquisition attempt times out.
  4. The useLockStriping parameter specifies whether a pool of shared locks are maintained for all entries that require locks. If set to FALSE, locks are created for each entry in the cache. For details, see Section 15.1, “About Lock Striping”
  5. The writeSkewCheck parameter is only valid if the isolationLevel is set to REPEATABLE_READ. If this parameter is set to FALSE, 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 to TRUE, such conflicts (namely write skews) throw an exception. The writeSkewCheck parameter can be only used with OPTIMISTIC transactions and it requires entry versioning to be enabled, with SIMPLE versioning scheme.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat