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

9.3. Configure Invalidation Mode (Library Mode)


The following procedure shows an invalidation mode cache configuration in Red Hat JBoss Data Grid's Library mode.

Procedure 9.2. Invalidation Mode Configuration

  1. Configure the Clustering Element

    <clustering mode="invalidation">
            <sync replTimeout="${TIME}" />
            <stateTransfer chunkSize="${SIZE}"
                           fetchInMemoryState="{true/false}"
                           awaitInitialTransfer="{true/false}"
                           timeout="${TIME}" />
    Copy to Clipboard Toggle word wrap
    1. The clustering element's mode parameter's value determines the clustering mode selected for the cache.
    2. The sync element's replTimeout parameter specifies the maximum time period in milliseconds for an acknowledgment after a remote call. If the time period ends without any acknowledgment, an exception is thrown.
    3. The stateTransfer element specifies how state is transferred when a node leaves or joins the cluster. It uses the following parameters:
      1. The chunkSize parameter specifies the size of cache entry state batches to be transferred. If this value is greater than 0, the value set is the size of chunks sent. If the value is less than 0, all states are transferred at the same time.
      2. The fetchInMemoryState parameter when set to true, requests state information from neighboring caches on start up. This impacts the start up time for the cache.
      3. The awaitInitialTransfer parameter causes the first call to method CacheManager.getCache() on the joiner node to block and wait until the joining is complete and the cache has finished receiving state from neighboring caches (if fetchInMemoryState is enabled). This option applies to distributed and replicated caches only and is enabled by default.
      4. The timeout parameter specifies the maximum time (in milliseconds) the cache waits for responses from neighboring caches with the requested states. If no response is received within the timeout period, the start up process aborts and an exception is thrown.
  2. Specify Transport Configuration

    <global>
        <transport clusterName="${NAME}"
            distributedSyncTimeout="${TIME}"
            transportClass="${CLASS}" />
    </global>
    Copy to Clipboard Toggle word wrap
    The transport element defines the transport configuration for the cache container as follows:
    1. The clusterName parameter specifies the name of the cluster. Nodes can only connect to clusters that share the same name.
    2. The distributedSyncTimeout parameter specifies the time to wait to acquire a lock on the distributed lock. This distributed lock ensures that a single cache can transfer state or rehash state at a time.
    3. The transportClass parameter specifies a class that represents a network transport for the cache container.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat