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

Chapter 5. Return Values


5.1. About Return Values

Values returned by cache operations are referred to as return values. In Red Hat JBoss Data Grid, these return values remain reliable irrespective of which cache mode is employed and whether synchronous or asynchronous communication is used.

5.2. Disabling Return Values

Library Mode

By default, in Library Mode, JBoss Data Grid returns previous values in the cache for put() and remove() API operations.

To conserve resources, you can disable these return values where you do not require them.

Use the IGNORE_RETURN_VALUES flag from the org.infinispan.context.Flag class as follows:

  1. Set the IGNORE_RETURN_VALUES flag. This flag signals that the operation’s return value is ignored. For example:

    cache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES)
    Copy to Clipboard Toggle word wrap
  2. Set the SKIP_CACHE_LOAD flag. This flag does not load entries from any configured CacheStores. For example:

    cache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_LOAD)
    Copy to Clipboard Toggle word wrap

    For more information, see Flag.IGNORE_RETURN_VALUES

Remote Client/Server Mode

By default, when remotely accessing caches in Server Mode, JBoss Data Grid disables return values so that put() and remove() API operations do not return previous values in the cache.

You can set the FORCE_RETURN_VALUE in org.infinispan.client.hotrod.Flag to return previous values for put() and remove() API operations. However, doing this adds performance costs through serialization and network requirements.

For more information, see Flag.FORCE_RETURN_VALUE

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2025 Red Hat