このコンテンツは選択した言語では利用できません。

9.3. Configure Locking (Library Mode)


For Library mode, the locking element and its parameters are set within the optional configuration element on a per cache basis. For example, for the default cache, the configuration element occurs within the default element and for each named cache, it occurs within the namedCache element. The following is an example of this configuration:
<infinispan>
	...
	<default>
		<configuration>
			<locking concurrencyLevel="${VALUE}"
				 isolationLevel="${LEVEL}"
				 lockAcquisitionTimeout="${TIME}"
				 useLockStriping="${TRUE/FALSE}"
				 writeSkewCheck="${TRUE/FALSE}"
				 supportsConcurrentUpdates="${TRUE/FALSE}" />
			...
		</configuration>
	</default>
</infinispan>
  • 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.
  • The isolationLevel parameter specifies the cache's isolation level. Valid isolation levels are READ_COMMITTED and REPEATABLE_READ. For details about isolation levels, refer to Chapter 11, Isolation Levels
  • The lockAcquisitionTimeout parameter specifies time (in milliseconds) after which a lock acquisition attempt times out.
  • 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, refer to Chapter 10, Lock Striping
  • 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 supportsConcurrentUpdates parameter is only valid for non-transactional caches. If this parameter is set to TRUE (default value), the cache ensures that the data remains consistent despite concurrent updates. If the application is not expected to perform concurrent writes, it is recommended that this parameter is set to FALSE to improve performance.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る