Class StateTransferConfiguration

java.lang.Object
org.infinispan.commons.configuration.attributes.ConfigurationElement<StateTransferConfiguration>
org.infinispan.configuration.cache.StateTransferConfiguration
All Implemented Interfaces:
org.infinispan.commons.configuration.attributes.Matchable<StateTransferConfiguration>, org.infinispan.commons.configuration.attributes.Updatable<StateTransferConfiguration>

public class StateTransferConfiguration extends org.infinispan.commons.configuration.attributes.ConfigurationElement<StateTransferConfiguration>
Configures how state is retrieved when a new cache joins the cluster. Used with distribution, replication and scattered clustered modes.
Since:
5.1
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean>
     
    static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer>
     
    static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean>
     
    static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long>
     

    Fields inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement

    attributes, CHILDLESS, children, element, repeated
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    If true, this will cause 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).
    int
    The state will be transferred in batches of chunkSize cache entries.
    boolean
    If true, the cache will fetch data from the neighboring caches when it starts up, so the cache starts 'warm', although it will impact startup time.
    long
    This is the maximum amount of time - in milliseconds - to wait for state from neighboring caches, before throwing an exception and aborting startup.
    timeout(long l)
    Deprecated.
    Since 12.1, the attribute was never writable

    Methods inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement

    attributes, child, children, children, elementName, equals, findAttribute, hashCode, isModified, list, matches, toString, update, validateUpdate, write

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • AWAIT_INITIAL_TRANSFER

      public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean> AWAIT_INITIAL_TRANSFER
    • FETCH_IN_MEMORY_STATE

      public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean> FETCH_IN_MEMORY_STATE
    • TIMEOUT

      public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long> TIMEOUT
    • CHUNK_SIZE

      public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Integer> CHUNK_SIZE
  • Method Details

    • fetchInMemoryState

      public boolean fetchInMemoryState()
      If true, the cache will fetch data from the neighboring caches when it starts up, so the cache starts 'warm', although it will impact startup time.

      In distributed mode, state is transferred between running caches as well, as the ownership of keys changes (e.g. because a cache left the cluster). Disabling this setting means a key will sometimes have less than numOwner owners.

    • timeout

      public long timeout()
      This is the maximum amount of time - in milliseconds - to wait for state from neighboring caches, before throwing an exception and aborting startup.
    • timeout

      @Deprecated public StateTransferConfiguration timeout(long l)
      Deprecated.
      Since 12.1, the attribute was never writable
      This is the maximum amount of time - in milliseconds - to wait for state from neighboring caches, before throwing an exception and aborting startup.
    • chunkSize

      public int chunkSize()
      The state will be transferred in batches of chunkSize cache entries. If chunkSize is equal to Integer.MAX_VALUE, the state will be transferred in all at once. Not recommended.
    • awaitInitialTransfer

      public boolean awaitInitialTransfer()
      If true, this will cause 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. Please note that setting this to false will make the cache object available immediately but any access to keys that should be available locally but are not yet transferred will actually cause a (transparent) remote access. While this will not have any impact on the logic of your application it might impact performance.