Infinispan configuration options 5.0


  <infinispan>
    <global>
      <globalJmxStatistics>
        <properties>
      <replicationQueueScheduledExecutor>
        <properties>
      <transport>
        <properties>
      <asyncTransportExecutor>
        <properties>
      <serialization>
        <externalizers>
          <externalizer>
      <shutdown>
      <evictionScheduledExecutor>
        <properties>
      <asyncListenerExecutor>
        <properties>
    <default>
      <transaction>
      <invocationBatching>
      <loaders>
        <loader>
          <async>
          <properties>
          <singletonStore>
      <clustering>
        <sync>
        <l1>
        <stateRetrieval>
        <async>
        <hash>
      <lazyDeserialization>
      <deadlockDetection>
      <eviction>
      <customInterceptors>
        <interceptor>
          <properties>
      <unsafe>
      <jmxStatistics>
      <locking>
      <indexing>
      <expiration>

async

Configuration for the async cache loader. If enabled, this provides you with asynchronous writes to the cache store, giving you 'write-behind' caching.

The parent element is <loader>.

AttributeTypeDefaultDescription
shutdownTimeout long 7200 Timeout to stop the cache store. When the store is stopped it's possible that some modifications still need to be applied; you likely want to set a very large timeout to make sure to not loose data (Javadoc)
threadPoolSize int 1 Size of the thread pool whose threads are responsible for applying the modifications. (Javadoc)
flushLockTimeout long 5000 Timeout to acquire the lock which guards the state to be flushed to the cache store periodically. (Javadoc)
enabled boolean false If true, all modifications to this cache store happen asynchronously, on a separate thread. (Javadoc)

async

If this element is present, all communications are asynchronous, in that whenever a thread sends a message sent over the wire, it does not wait for an acknowledgment before returning. This element is mutually exclusive with the <sync /> element.

Characteristics of this can be tuned here.

The parent element is <clustering>.

AttributeTypeDefaultDescription
replQueueMaxElements int 1000 If useReplQueue is set to true, this attribute can be used to trigger flushing of the queue when it reaches a specific threshold. (Javadoc)
replQueueClass string org.infinispan.remoting.ReplicationQueueImpl This overrides the replication queue implementation class. Overriding the default allows you to add behavior to the queue, typically by subclassing the default implementation. (Javadoc)
useReplQueue boolean false If true, this forces all async communications to be queued up and sent out periodically as a batch. (Javadoc)
replQueueInterval long 5000 If useReplQueue is set to true, this attribute controls how often the asynchronous thread used to flush the replication queue runs. This should be a positive integer which represents thread wakeup time in milliseconds. (Javadoc)
asyncMarshalling boolean false If true, asynchronous marshalling is enabled which means that caller can return even quicker, but it can suffer from reordering of operations. You can find more information here (Javadoc)

asyncListenerExecutor

Configuration for the executor service used to emit notifications to asynchronous listeners

The parent element is <global>. The only child element is <properties>.

AttributeTypeDefaultDescription
factory string org.infinispan.executors.DefaultExecutorFactory Fully qualified class name of the ExecutorFactory to use. Must implement org.infinispan.executors.ExecutorFactory (Javadoc)
PropertyDescription
threadNamePrefix Thread name prefix for threads created by this executor. Default values can be found here
maxThreads Maximum number of threads for this executor. Default values can be found here

asyncTransportExecutor

Configuration for the executor service used for asynchronous work on the Transport, including asynchronous marshalling and Cache 'async operations' such as Cache.putAsync().

The parent element is <global>. The only child element is <properties>.

AttributeTypeDefaultDescription
factory string org.infinispan.executors.DefaultExecutorFactory Fully qualified class name of the ExecutorFactory to use. Must implement org.infinispan.executors.ExecutorFactory (Javadoc)
PropertyDescription
threadNamePrefix Thread name prefix for threads created by this executor. Default values can be found here
maxThreads Maximum number of threads for this executor. Default values can be found here

clustering

Defines clustered characteristics of the cache.

The parent element is <default>. Child elements are <sync>, <l1>, <stateRetrieval>, <async>, <hash>.

AttributeTypeDefaultDescription
mode string DIST_SYNC Cache mode. For distribution, set mode to either 'd', 'dist' or 'distribution'. For replication, use either 'r', 'repl' or 'replication'. Finally, for invalidation, 'i', 'inv' or 'invalidation'. If the cache mode is set to 'l' or 'local', the cache in question will not support clustering even if its cache manager does. (Javadoc)

customInterceptors

Configures custom interceptors to be added to the cache.

The parent element is <default>. The only child element is <interceptor>.

deadlockDetection

This element configures deadlock detection.

The parent element is <default>.

AttributeTypeDefaultDescription
enabled boolean false Toggle to enable/disable deadlock detection (Javadoc)
spinDuration long 100 Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock (Javadoc)

default

Encapsulates the configuration of a Cache. Configures the default cache which can be retrieved via CacheManager.getCache(). These default settings are also used as a starting point when configuring namedCaches, since the default settings are inherited by any named cache.

The parent element is <infinispan>. Child elements are <transaction>, <invocationBatching>, <loaders>, <clustering>, <lazyDeserialization>, <deadlockDetection>, <eviction>, <customInterceptors>, <unsafe>, <jmxStatistics>, <locking>, <indexing>, <expiration>.

AttributeTypeDefaultDescription
name string null Only used with the namedCache element, this attribute specifies the name of the cache. Can be any String, but must be unique in a given configuration. (Javadoc)

eviction

This element controls the eviction settings for the cache.

The parent element is <default>.

AttributeTypeDefaultDescription
strategy evictionStrategy* (NONE|UNORDERED|FIFO|LRU|LIRS) NONE Eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU' and 'NONE' (to disable eviction). (Javadoc)
maxEntries int -1 Maximum number of entries in a cache instance. If selected value is not a power of two the actual value will default to the least power of two larger than selected value. -1 means no limit. (Javadoc)
wakeUpInterval long 5000 Interval between subsequent eviction runs, in milliseconds. If you wish to disable the periodic eviction process altogether, set wakeupInterval to -1. (Javadoc)
threadPolicy evictionThreadPolicy* (PIGGYBACK|DEFAULT) DEFAULT Threading policy for eviction. (Javadoc)

evictionScheduledExecutor

Configuration for the scheduled executor service used to periodically run eviction cleanup tasks.

The parent element is <global>. The only child element is <properties>.

AttributeTypeDefaultDescription
factory string org.infinispan.executors.DefaultScheduledExecutorFactory Fully qualified class name of the ScheduledExecutorFactory to use. Must implement org.infinispan.executors.ScheduledExecutorFactory (Javadoc)
PropertyDescription
threadNamePrefix Thread name prefix for threads created by this executor. Default values can be found here
maxThreads Maximum number of threads for this executor. Default values can be found here

expiration

This element controls the default expiration settings for entries in the cache.

The parent element is <default>.

AttributeTypeDefaultDescription
maxIdle long -1 Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.

Note that this can be overriden on a per-entry bassi by using the Cache API. (Javadoc)
lifespan long -1 Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.

Note that this can be overriden on a per-entry bassi by using the Cache API. (Javadoc)

externalizer


Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.