Infinispan configuration reference
This topic has not yet been written. The content below is from the topic description.
Infinispan configuration options 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 . Attribute Type Default Description 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 acknowledgement before returning. This element is mutually exclusive with the element. Characteristics of this can be tuned here. The parent element is . Attribute Type Default Description 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) asyncMarshalling boolean true If true, asynchronous marshalling is enabled which means that caller can return even quicker. (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) useReplQueue boolean false If true, this forces all async communications to be queued up and sent out periodically as a batch. (Javadoc) asyncListenerExecutor Configuration for the executor service used to emit notifications to asynchronous listeners.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 . The only child element is . Attribute Type Default Description factory string org.infinispan.executors.DefaultExecutorFactory Fully qualified class name of the ExecutorFactory to use. Must implement org.infinispan.executors.ExecutorFactory (Javadoc) asyncTransportExecutor Configuration for the executor service used to emit notifications to asynchronous listeners.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 . The only child element is . Attribute Type Default Description factory string org.infinispan.executors.DefaultExecutorFactory Fully qualified class name of the ExecutorFactory to use. Must implement org.infinispan.executors.ExecutorFactory (Javadoc) clustering Defines clustered characteristics of the cache. The parent element is . Child elements are , , , , . Attribute Type Default Description mode string LOCAL 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'. (Javadoc) customInterceptors Configures custom interceptors to be added to the cache. The parent element is . The only child element is . deadlockDetection This element configures deadlock detection. The parent element is . Attribute Type Default Description 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 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.  If you use . Child elements are , , , , , , , , , , , , . Attribute Type Default Description 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 . Attribute Type Default Description maxEntries int -1 Maximum number of entries in a cache instance. -1 means no limit. (Javadoc) wakeUpInterval long 5000 Interval between subsequent eviction runs. If you wish to disable the periodic eviction process altogether, set wakeupInterval to -1. (Javadoc) strategy evictionStrategy* (NONE|FIFO|LRU) NONE Eviction strategy. Available options are 'NONE', 'FIFO' and 'LRU'. (Javadoc) evictionScheduledExecutor Configuration for the scheduled executor service used to periodically run eviction cleanup tasks.Configuration for the scheduled executor service used to periodically flush replication queues, used if asynchronous clustering is enabled along with useReplQueue being set to true. The parent element is . The only child element is . Attribute Type Default Description factory string org.infinispan.executors.DefaultScheduledExecutorFactory Fully qualified class name of the ScheduledExecutorFactory to use. Must implement org.infinispan.executors.ScheduledExecutorFactory (Javadoc) expiration This element controls the default expiration settings for entries in the cache. The parent element is . Attribute Type Default Description lifespan long -1 Maximum lifespan of a cache entry, after which the entry is 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) maxIdle long -1 Maximum idle time a cache entry will be maintained in the cache. 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) global Defines global settings shared among all cache instances created by a single CacheManager. The parent element is . Child elements are , , , , , , , . globalJmxStatistics This element specifies whether global statistics are gathered and reported via JMX for all caches under this cache manager. The parent element is . Attribute Type Default Description enabled boolean false Toggle to enable/disable global statistics being exported via JMX. (Javadoc) allowDuplicateDomains boolean false If true, multiple cache manager instances could be configured under the same configured JMX domain. Each cache manager will in practice use a different JMX domain that has been calculated based on the configured one by adding an incrementing index to it. (Javadoc) mBeanServerLookup string org.infinispan.jmx.PlatformMBeanServerLookup Fully qualified name of class that will attempt to locate a JMX MBean server to bind to (Javadoc) jmxDomain string infinispan JMX domain name where all relevant JMX exposed objects will be bound (Javadoc) hash Allows fine-tuning of rehashing characteristics. Only used with 'distributed' cache mode, and otherwise ignored. The parent element is . Attribute Type Default Description rehashEnabled boolean true If false, no rebalancing or rehashing will take place when a new node joins the cluster or a node leaves. (Javadoc) class string org.infinispan.distribution.DefaultConsistentHash Fully qualified name of class providing consistent hash algorithm (Javadoc) numOwners int 2 Number of cluster-wide replicas for each cache entry. (Javadoc) rehashWait long 60000 Future flag. Currenly unused. (Javadoc) rehashRpcTimeout long 600000 Rehashing timeout (Javadoc) indexing Configures indexing of entries in the cache for searching. Note that infinispan-query.jar and its dependencies needs to be available if this option is to be used. The parent element is . Attribute Type Default Description indexLocalOnly boolean false If true, only index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates. (Javadoc) enabled boolean false If enabled, entries will be indexed when they are added to the cache. Indexes will be updated as entries change or are removed. (Javadoc) infinispan The root element of an Infinispan configuration. This element can be empty for sensible defaults throughout, however that would only give you the most basic of local, non-clustered caches. Child elements are , . interceptor This element allows you configure and inject a custom interceptor. This tag may appear multiple times. The parent element is . The only child element is . Attribute Type Default Description before string null Will place the new interceptor directly before the instance of the named interceptor which is specified via its fully qualified class name.. Note that this attribute is mutually exclusive with 'position', 'after' and 'index'. (Javadoc) index int -1 A position at which to place this interceptor in the chain, with 0 being the first position. Note that this attribute is mutually exclusive with 'position', 'before' and 'after'. (Javadoc) class string null Fully qualified interceptor class name which must extend org.infinispan.interceptors.base.CommandInterceptor. (Javadoc) position position* (FIRST|LAST) null A position at which to place this interceptor in the chain. FIRST is the first interceptor encountered when an invocation is made on the cache, LAST is the last interceptor before the call is passed on to the data structure. Note that this attribute is mutually exclusive with 'before', 'after' and 'index'. (Javadoc) after string null Will place the new interceptor directly after the instance of the named interceptor which is specified via its fully qualified class name. Note that this attribute is mutually exclusive with 'position', 'before' and 'index'. (Javadoc) invocationBatching Defines whether invocation batching is allowed in this cache instance, and sets up internals accordingly to allow use of this API. The parent element is . Attribute Type Default Description enabled boolean false Toggle switch (Javadoc) jmxStatistics This element specifies whether cache statistics are gathered and reported via JMX. The parent element is . Attribute Type Default Description enabled boolean false Toggle switch (Javadoc) l1 This element configures the L1 cache behavior in 'distributed' caches instances. In any other cache modes, this element is ignored. The parent element is . Attribute Type Default Description enabled boolean true Toggle to enable/disable L1 cache. (Javadoc) onRehash boolean true If true, entries removed due to a rehash will be moved to L1 rather than being removed altogether. (Javadoc) lifespan long 600000 Maximum lifespan of an entry placed in the L1 cache. (Javadoc) lazyDeserialization A mechanism by which serialization and deserialization of objects is deferred till the point in time in which they are used and needed. This typically means that any deserialization happens using the thread context class loader of the invocation that requires deserialization, and is an effective mechanism to provide classloader isolation. The parent element is . Attribute Type Default Description enabled boolean false Toggle switch (Javadoc) loader Responsible for loading/storing cache data from/to an external source. The parent element is . Child elements are , , . Attribute Type Default Description class string null Fully qualified name of a cache loader class that must implement org.infinispan.loaders.CacheLoader interface. (Javadoc) purgeSynchronously boolean false If true, CacheStore#purgeExpired() call will be done synchronously (Javadoc) purgerThreads int 1 The number of threads to use when purging asynchronously. (Javadoc) fetchPersistentState boolean false If true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled. Persistent state transfer with a shared cache store does not make sense, as the same persistent store that provides the data will just end up receiving it. Therefore, if a shared cache store is used, the cache will not allow a persistent state transfer even if a cache store has this property set to true. Finally, setting it to true only makes sense if in a clustered environment, and only 'replication' and 'invalidation' cluster modes are supported. (Javadoc) purgeOnStartup boolean false If true, purges this cache store when it starts up. (Javadoc) ignoreModifications boolean false If true, any operation that modifies the cache (put, remove, clear, store...etc) won't be applied to the cache store. This means that the cache store could become out of sync with the cache. (Javadoc) loaders Holds the configuration for cache loaders and stores. The parent element is . The only child element is . Attribute Type Default Description preload boolean false If true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process. (Javadoc) passivation boolean false If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. (Javadoc) shared boolean false This setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store. Note that this could be useful if each individual node has its own cache store - perhaps local on-disk. (Javadoc) locking Defines the local, in-VM locking and concurrency characteristics of the cache. The parent element is . Attribute Type Default Description useLockStriping boolean true If true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system. (Javadoc) writeSkewCheck boolean false This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. (Javadoc) lockAcquisitionTimeout long 10000 Maximum time to attempt a particular lock acquisition (Javadoc) isolationLevel isolationLevel* (NONE|SERIALIZABLE|REPEATABLE_READ|READ_COMMITTED|READ_UNCOMMITTED) READ_COMMITTED Cache isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation levels. See http://en.wikipedia.org/wiki/Isolation_level for a discussion on isolation levels. (Javadoc) concurrencyLevel int 512 Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interating with Infinispan. Similar to the concurrencyLevel tuning parameter seen in the JDK's ConcurrentHashMap. (Javadoc) replicationQueueScheduledExecutor Configuration for the scheduled executor service used to periodically run eviction cleanup tasks.Configuration for the scheduled executor service used to periodically flush replication queues, used if asynchronous clustering is enabled along with useReplQueue being set to true. The parent element is . The only child element is . Attribute Type Default Description factory string org.infinispan.executors.DefaultScheduledExecutorFactory Fully qualified class name of the ScheduledExecutorFactory to use. Must implement org.infinispan.executors.ScheduledExecutorFactory (Javadoc) serialization Serialization and marshalling settings. The parent element is . Attribute Type Default Description version string 4.0 Largest allowable version to use when marshalling internal state. Set this to the lowest version cache instance in your cluster to ensure compatibility of communications. However, setting this too low will mean you lose out on the benefit of improvements in newer versions of the marshaller. (Javadoc) marshallerClass string org.infinispan.marshall.VersionAwareMarshaller Fully qualified name of the marshaller to use. It must implement org.infinispan.marshall.Marshaller. (Javadoc) shutdown This element specifies behavior when the JVM running the cache instance shuts down. The parent element is . Attribute Type Default Description hookBehavior shutdownHookBehavior* (DEFAULT|REGISTER|DONT_REGISTER) DEFAULT Behavior of the JVM shutdown hook registered by the cache. The options available are: DEFAULT - A shutdown hook is registered even if no MBean server (apart from the JDK default) is detected. REGISTER - Forces the cache to register a shutdown hook even if an MBean server is detected. DONT_REGISTER - Forces the cache NOT to register a shutdown hook, even if no MBean server is detected. (Javadoc) singletonStore SingletonStore is a delegating cache store used for situations when only one instance in a cluster should