Defines the configuration for Infinispan, for the cache manager configuration, for the default cache, and for named caches.
jgroups?
Defines JGroups stacks.
Defines JGroups transport stacks.Name | Type | Default | Description |
---|---|---|---|
transport | string | org.infinispan.remoting.transport.jgroups.JGroupsTransport | Class that represents a network transport. Must implement org.infinispan.remoting.transport.Transport. |
stack-file+
Name | Type | Default | Description |
---|---|---|---|
name | string | Name of the stack, to be referenced by transport's stack attribute. | |
path | string | Path of JGroups configuration file containing stack definition. |
threads?
Defines the threading subsystem.
The threading subsystem, used to declare manageable thread pools and resources.thread-factory*
Name | Type | Default | Description |
---|---|---|---|
name | string | ||
group-name | string | ||
thread-name-pattern | string | ||
priority | string |
blocking-bounded-queue-thread-pool*
Name | Type | Default | Description |
---|---|---|---|
name | string | ||
thread-factory | string | ||
max-threads | int | ||
core-threads | int | ||
keepalive-time | string | ||
queue-length | string |
cached-thread-pool*
Name | Type | Default | Description |
---|---|---|---|
name | string | ||
thread-factory | string |
scheduled-thread-pool*
Name | Type | Default | Description |
---|---|---|---|
name | string | ||
thread-factory | string |
cache-container
Defines an embedded cache container.
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
name | string | Uniquely identifies this cache container. | |||||||
aliases | Unused XML attribute | ||||||||
jndi-name | string | Unused XML attribute | |||||||
default-cache | string | Indicates the default cache for this cache container. | |||||||
start | FIXME | Unused XML attribute | |||||||
listener-executor | string | Defines the executor used for asynchronous cache listener notifications. | |||||||
eviction-executor | string | Defines the scheduled executor used for evictions. | |||||||
replication-queue-executor | string | Defines the scheduled executor used by the asynchronous replication queue. | |||||||
persistence-executor | string | Configuration for the executor service used when interacting with the persistent store. | |||||||
module | string | org.jboss.as.clustering.infinispan | Unused XML attribute | ||||||
statistics | boolean | true | Determines whether or not the cache container should collect statistics. Keep disabled for optimal performance. | ||||||
shutdown-hook |
|
Behavior of the JVM shutdown hook registered by the cache |
transport?
Overrides the transport characteristics for this cache container.
Name | Type | Default | Description |
---|---|---|---|
stack | string | Defines the jgroups stack used by the transport. | |
cluster | string | Defines the name for the underlying group communication cluster. | |
executor | string | Defines the executor used for asynchronous transport communication. | |
total-order-executor | string | Configuration for the total order executor service used to concurrent validate non conflicting transactions. | |
remote-command-executor | string | Configuration for the executor service used to execute remote commands. Use org.infinispan.executors.WithinThreadExecutorFactory to disable. | |
lock-timeout | long | 240000 | Infinispan uses a distributed lock to maintain a coherent transaction log during state transfer or rehashing, which means that only one cache can be doing state transfer or rehashing at the same time. This constraint is in place because more than one cache could be involved in a transaction. This timeout controls the time to wait to acquire a distributed lock. |
node-name | string | Name of the current node. This is a friendly name to make logs, etc. make more sense. Defaults to a combination of host name and a random number (to differentiate multiple nodes on the same host) | |
machine | string | The id of the machine where this node runs. | |
rack | string | The id of the rack where this node runs. | |
site | string | The id of the site where this node runs. |
security?
Configures security for this cache container.
authorization?
Configures the global authorization role to permission mapping. The presence of this element in the configuration implicitly enables authorization.
Name | Type | Default | Description |
---|---|---|---|
audit-logger | string | Class of the audit logger. |
identity-role-mapper
Uses the identity role mapper where principal names are converted as-is into role names.
common-name-role-mapper
Uses the common name role mapper which assumes principal names are in Distinguished Name format and extracts the Common Name to use as a role
cluster-role-mapper
Uses the cluster role mapper which stores the principal to role mappings within the cluster registry.
custom-role-mapper
Uses a custom role mapper.
Name | Type | Default | Description |
---|---|---|---|
class | string | Class of the custom principal to role mapper |
role*
Defines a new role name and assigns permissions to it.
Name | Type | Default | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | string | Defines the name of the role. | |||||||||||||||||||||||||
permissions |
|
Defines the list of permissions for the role. |
serialization?
Specifies how data serialization will be performed by the cache container.
Name | Type | Default | Description |
---|---|---|---|
marshaller | string | org.infinispan.marshall.core.VersionAwareMarshaller | Fully qualified name of the marshaller to use. It must implement org.infinispan.marshall.StreamingMarshaller |
version | string | 71 | 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. |
advanced-externalizer*
AdvancedExternalizer provides an alternative way to provide externalizers for marshalling/unmarshalling user defined classes that overcome the deficiencies of the more user-friendly externalizer definition model explained in Externalizer.
Name | Type | Default | Description |
---|---|---|---|
class | string | Class of the custom externalizer | |
id | int | Id of the custom externalizer |
jmx?
Defines JMX management details.
Name | Type | Default | Description |
---|---|---|---|
domain | string | org.infinispan | If JMX statistics are enabled then all 'published' JMX objects will appear under this name. This is optional, if not specified an object name will be created for you by default. |
mbean-server-lookup | string | org.infinispan.jmx.PlatformMBeanServerLookup | Class that will attempt to locate a JMX MBean server to bind to. Defaults to using the platform MBean server. |
duplicate-domains | 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. |
property*
A jmx property with name and value to be passed to the MBean Server lookup instance.
local-cache
Defines a LOCAL mode cache.
Name | Type | Default | Description |
---|---|---|---|
name | string | Uniquely identifies this cache within its cache container. | |
start | FIXME | Unused XML attribute | |
jndi-name | string | Unused XML attribute | |
module | string | Unused XML attribute | |
statistics | boolean | true | Determines whether or not the cache should collect statistics. Keep disabled for optimal performance. |
deadlock-detection-spin | long | 100 | Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock. Defaults to 100ms. |
unreliable-return-values | boolean | false | Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods. |
locking?
The locking configuration of the cache.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isolation |
|
READ_COMMITTED | Sets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level. | ||||||||||
striping | boolean | false | 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. | ||||||||||
acquire-timeout | long | 10000 | Maximum time to attempt a particular lock acquisition. | ||||||||||
concurrency-level | int | 32 | Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan. | ||||||||||
write-skew | 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. Defaults to false. |
transaction?
The cache transaction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mode |
|
NONE | Sets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA. | ||||||||||
stop-timeout | long | 30000 | If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout. | ||||||||||
locking |
|
OPTIMISTIC | The locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC. | ||||||||||
transaction-manager-lookup | string | org.infinispan.transaction.lookup.GenericTransactionManagerLookup.GenericTransactionManagerLookup | Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional. | ||||||||||
complete-timeout | long | 60000 | The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000. | ||||||||||
reaper-interval | long | 30000 | The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000. | ||||||||||
auto-commit | boolean | true | If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true. | ||||||||||
protocol |
|
Configures the commit protocol to use. | |||||||||||
recovery-cache | string | __recoveryInfoCacheName__ | Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__" |
eviction?
The cache eviction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strategy |
|
NONE | Sets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction). | ||||||||||
max-entries | 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. | ||||||||||
thread-policy |
|
DEFAULT | Threading policy for eviction. Defaults to using the DEFAULT eviction policy. |
expiration?
The cache expiration configuration.
Name | Type | Default | Description |
---|---|---|---|
max-idle | 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. |
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. |
interval | long | 60000 | Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1. |
compatibility?
The cache compatibility mode configuration.
Name | Type | Default | Description |
---|---|---|---|
marshaller | string | A marshaller to use for compatibility conversions. |
store-as-binary?
Configures the cache to store data in binary format.
Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both.Name | Type | Default | Description |
---|---|---|---|
keys | boolean | true | Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
values | boolean | true | Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
persistence?
Configures the cache's persistence layer.
Name | Type | Default | Description |
---|---|---|---|
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. Defaults to false. |
versioning?
Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.
Name | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
scheme |
|
NONE | The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE |
data-container?
Controls the data container for the cache.
Name | Type | Default | Description |
---|---|---|---|
class | string | Fully qualified class name of the data container to use | |
key-equivalence | string | Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys | |
value-equivalence | string | Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values |
property*
Properties passed to the data container
modules?
This element contains configuration options for additional modules which affect cache configuration
indexing?
defined indexing options for cache
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
index |
|
NONE | The indexing mode of the cache. Defaults to NONE. | ||||||
auto-config | boolean | false | Whether or not to apply automatic index configuration based on cache type |
property*
Property to pass on to the indexing system
custom-interceptors?
Configures custom interceptors to be added to the cache.
interceptor*
Name | Type | Default | Description |
---|---|---|---|
after | string | Dictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
before | string | Dictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
class | string | A fully qualified class name of the new custom interceptor to add to the configuration. | |
index | int | Specifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain. | |
position | string | Specifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST |
property?
security?
Configures cache-level security.
authorization?
Configures authorization for this cache.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enables authorization checks for this cache. Defaults to true if the authorization element is present. |
roles | Sets the valid roles required to access this cache. |
replicated-cache
Defines a REPL_* mode cache.
state-transfer?
The state transfer configuration for distribution and replicated caches.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | If enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time. |
timeout | long | 60000 | The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup. |
chunk-size | integer | 512 | The number of cache entries to batch in each transfer. |
await-initial-transfer | boolean | true | If enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests. |
Name | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
async-marshalling | boolean | false | Enables the use of asynchronous marshalling | ||||
mode |
|
Sets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation. | |||||
queue-size | int | 0 | In ASYNC mode, this attribute can be used to trigger flushing of the queue when it reaches a specific threshold. A value of 0 (the default) disables the replication queue. | ||||
queue-flush-interval | long | 10 | In ASYNC mode, 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. | ||||
remote-timeout | long | 15000 | In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown. |
backups?
The state transfer configuration for distribution and replicated caches.
backup+
Configures a specific site where this cache backups data.
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
site | string | Name of the remote site where this cache backups data. | |||||||
strategy |
|
ASYNC | The strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC" | ||||||
failure-policy |
|
WARN | Decides what the system would do in case of failure during backup. Defaults to "FAIL" | ||||||
timeout | long | 10000 | The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs. | ||||||
enabled | boolean | true | If 'false' then no data is backed up to this site. Defaults to 'true'. | ||||||
two-phase-commit | boolean | false | Whether a backup will use a 2PC cycle for SYNC backups. Defaults to "false". NOTE: Not used for ASYNC backup strategies. | ||||||
failure-policy-class | string | If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy. |
take-offline?
Determines whether this backup is taken offline (ignored) after a certain number of tries.
Name | Type | Default | Description |
---|---|---|---|
after-failures | int | 0 | The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'. |
min-wait | long | 0 | The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered. |
state-transfer?
Configures the properties needed to transfer the state for this site.
Name | Type | Default | Description |
---|---|---|---|
chunk-size | int | 512 | If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512. |
timeout | long | 1200000 | The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min. |
max-retries | int | 30 | The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30. |
wait-time | long | 2000 | The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds. |
backup-for?
Configures this cache as a backup for a remote cache.
Name | Type | Default | Description |
---|---|---|---|
remote-cache | string | The name of the remote cache that backups data here. | |
remote-site | string | The name of the remote site containing the cache that backups data here. |
partition-handling?
Configures the way this cache reacts to node crashes and split brains.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | Enable/disable the partition handling functionality. Defaults to false. |
Name | Type | Default | Description |
---|---|---|---|
name | string | Uniquely identifies this cache within its cache container. | |
start | FIXME | Unused XML attribute | |
jndi-name | string | Unused XML attribute | |
module | string | Unused XML attribute | |
statistics | boolean | true | Determines whether or not the cache should collect statistics. Keep disabled for optimal performance. |
deadlock-detection-spin | long | 100 | Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock. Defaults to 100ms. |
unreliable-return-values | boolean | false | Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods. |
locking?
The locking configuration of the cache.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isolation |
|
READ_COMMITTED | Sets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level. | ||||||||||
striping | boolean | false | 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. | ||||||||||
acquire-timeout | long | 10000 | Maximum time to attempt a particular lock acquisition. | ||||||||||
concurrency-level | int | 32 | Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan. | ||||||||||
write-skew | 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. Defaults to false. |
transaction?
The cache transaction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mode |
|
NONE | Sets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA. | ||||||||||
stop-timeout | long | 30000 | If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout. | ||||||||||
locking |
|
OPTIMISTIC | The locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC. | ||||||||||
transaction-manager-lookup | string | org.infinispan.transaction.lookup.GenericTransactionManagerLookup.GenericTransactionManagerLookup | Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional. | ||||||||||
complete-timeout | long | 60000 | The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000. | ||||||||||
reaper-interval | long | 30000 | The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000. | ||||||||||
auto-commit | boolean | true | If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true. | ||||||||||
protocol |
|
Configures the commit protocol to use. | |||||||||||
recovery-cache | string | __recoveryInfoCacheName__ | Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__" |
eviction?
The cache eviction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strategy |
|
NONE | Sets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction). | ||||||||||
max-entries | 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. | ||||||||||
thread-policy |
|
DEFAULT | Threading policy for eviction. Defaults to using the DEFAULT eviction policy. |
expiration?
The cache expiration configuration.
Name | Type | Default | Description |
---|---|---|---|
max-idle | 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. |
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. |
interval | long | 60000 | Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1. |
compatibility?
The cache compatibility mode configuration.
Name | Type | Default | Description |
---|---|---|---|
marshaller | string | A marshaller to use for compatibility conversions. |
store-as-binary?
Configures the cache to store data in binary format.
Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both.Name | Type | Default | Description |
---|---|---|---|
keys | boolean | true | Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
values | boolean | true | Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
persistence?
Configures the cache's persistence layer.
Name | Type | Default | Description |
---|---|---|---|
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. Defaults to false. |
versioning?
Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.
Name | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
scheme |
|
NONE | The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE |
data-container?
Controls the data container for the cache.
Name | Type | Default | Description |
---|---|---|---|
class | string | Fully qualified class name of the data container to use | |
key-equivalence | string | Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys | |
value-equivalence | string | Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values |
property*
Properties passed to the data container
modules?
This element contains configuration options for additional modules which affect cache configuration
indexing?
defined indexing options for cache
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
index |
|
NONE | The indexing mode of the cache. Defaults to NONE. | ||||||
auto-config | boolean | false | Whether or not to apply automatic index configuration based on cache type |
property*
Property to pass on to the indexing system
custom-interceptors?
Configures custom interceptors to be added to the cache.
interceptor*
Name | Type | Default | Description |
---|---|---|---|
after | string | Dictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
before | string | Dictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
class | string | A fully qualified class name of the new custom interceptor to add to the configuration. | |
index | int | Specifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain. | |
position | string | Specifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST |
property?
security?
Configures cache-level security.
authorization?
Configures authorization for this cache.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enables authorization checks for this cache. Defaults to true if the authorization element is present. |
roles | Sets the valid roles required to access this cache. |
invalidation-cache
Defines an INVALIDATION_* mode cache.
Name | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
async-marshalling | boolean | false | Enables the use of asynchronous marshalling | ||||
mode |
|
Sets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation. | |||||
queue-size | int | 0 | In ASYNC mode, this attribute can be used to trigger flushing of the queue when it reaches a specific threshold. A value of 0 (the default) disables the replication queue. | ||||
queue-flush-interval | long | 10 | In ASYNC mode, 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. | ||||
remote-timeout | long | 15000 | In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown. |
backups?
The state transfer configuration for distribution and replicated caches.
backup+
Configures a specific site where this cache backups data.
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
site | string | Name of the remote site where this cache backups data. | |||||||
strategy |
|
ASYNC | The strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC" | ||||||
failure-policy |
|
WARN | Decides what the system would do in case of failure during backup. Defaults to "FAIL" | ||||||
timeout | long | 10000 | The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs. | ||||||
enabled | boolean | true | If 'false' then no data is backed up to this site. Defaults to 'true'. | ||||||
two-phase-commit | boolean | false | Whether a backup will use a 2PC cycle for SYNC backups. Defaults to "false". NOTE: Not used for ASYNC backup strategies. | ||||||
failure-policy-class | string | If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy. |
take-offline?
Determines whether this backup is taken offline (ignored) after a certain number of tries.
Name | Type | Default | Description |
---|---|---|---|
after-failures | int | 0 | The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'. |
min-wait | long | 0 | The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered. |
state-transfer?
Configures the properties needed to transfer the state for this site.
Name | Type | Default | Description |
---|---|---|---|
chunk-size | int | 512 | If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512. |
timeout | long | 1200000 | The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min. |
max-retries | int | 30 | The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30. |
wait-time | long | 2000 | The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds. |
backup-for?
Configures this cache as a backup for a remote cache.
Name | Type | Default | Description |
---|---|---|---|
remote-cache | string | The name of the remote cache that backups data here. | |
remote-site | string | The name of the remote site containing the cache that backups data here. |
partition-handling?
Configures the way this cache reacts to node crashes and split brains.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | Enable/disable the partition handling functionality. Defaults to false. |
Name | Type | Default | Description |
---|---|---|---|
name | string | Uniquely identifies this cache within its cache container. | |
start | FIXME | Unused XML attribute | |
jndi-name | string | Unused XML attribute | |
module | string | Unused XML attribute | |
statistics | boolean | true | Determines whether or not the cache should collect statistics. Keep disabled for optimal performance. |
deadlock-detection-spin | long | 100 | Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock. Defaults to 100ms. |
unreliable-return-values | boolean | false | Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods. |
locking?
The locking configuration of the cache.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isolation |
|
READ_COMMITTED | Sets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level. | ||||||||||
striping | boolean | false | 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. | ||||||||||
acquire-timeout | long | 10000 | Maximum time to attempt a particular lock acquisition. | ||||||||||
concurrency-level | int | 32 | Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan. | ||||||||||
write-skew | 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. Defaults to false. |
transaction?
The cache transaction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mode |
|
NONE | Sets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA. | ||||||||||
stop-timeout | long | 30000 | If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout. | ||||||||||
locking |
|
OPTIMISTIC | The locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC. | ||||||||||
transaction-manager-lookup | string | org.infinispan.transaction.lookup.GenericTransactionManagerLookup.GenericTransactionManagerLookup | Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional. | ||||||||||
complete-timeout | long | 60000 | The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000. | ||||||||||
reaper-interval | long | 30000 | The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000. | ||||||||||
auto-commit | boolean | true | If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true. | ||||||||||
protocol |
|
Configures the commit protocol to use. | |||||||||||
recovery-cache | string | __recoveryInfoCacheName__ | Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__" |
eviction?
The cache eviction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strategy |
|
NONE | Sets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction). | ||||||||||
max-entries | 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. | ||||||||||
thread-policy |
|
DEFAULT | Threading policy for eviction. Defaults to using the DEFAULT eviction policy. |
expiration?
The cache expiration configuration.
Name | Type | Default | Description |
---|---|---|---|
max-idle | 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. |
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. |
interval | long | 60000 | Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1. |
compatibility?
The cache compatibility mode configuration.
Name | Type | Default | Description |
---|---|---|---|
marshaller | string | A marshaller to use for compatibility conversions. |
store-as-binary?
Configures the cache to store data in binary format.
Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both.Name | Type | Default | Description |
---|---|---|---|
keys | boolean | true | Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
values | boolean | true | Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
persistence?
Configures the cache's persistence layer.
Name | Type | Default | Description |
---|---|---|---|
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. Defaults to false. |
versioning?
Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.
Name | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
scheme |
|
NONE | The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE |
data-container?
Controls the data container for the cache.
Name | Type | Default | Description |
---|---|---|---|
class | string | Fully qualified class name of the data container to use | |
key-equivalence | string | Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys | |
value-equivalence | string | Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values |
property*
Properties passed to the data container
modules?
This element contains configuration options for additional modules which affect cache configuration
indexing?
defined indexing options for cache
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
index |
|
NONE | The indexing mode of the cache. Defaults to NONE. | ||||||
auto-config | boolean | false | Whether or not to apply automatic index configuration based on cache type |
property*
Property to pass on to the indexing system
custom-interceptors?
Configures custom interceptors to be added to the cache.
interceptor*
Name | Type | Default | Description |
---|---|---|---|
after | string | Dictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
before | string | Dictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
class | string | A fully qualified class name of the new custom interceptor to add to the configuration. | |
index | int | Specifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain. | |
position | string | Specifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST |
property?
security?
Configures cache-level security.
authorization?
Configures authorization for this cache.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enables authorization checks for this cache. Defaults to true if the authorization element is present. |
roles | Sets the valid roles required to access this cache. |
distributed-cache
Defines a DIST_* mode cache.
Name | Type | Default | Description |
---|---|---|---|
owners | int | 2 | Number of cluster-wide replicas for each cache entry. |
segments | int | 60 | Number of hash space segments (per cluster). The recommended value is 10 * cluster size. The default value is 80 |
capacity-factor | double | 1 | Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. Value must be positive. The default is 1 |
l1-lifespan | long | Maximum lifespan in milliseconds of an entry placed in the L1 cache. By default L1 is disabled unless a positive value is configured for this attribute. If the attribute is not present, L1 is disabled. | |
l1-cleanup-interval | long | 60000 | Controls how often a cleanup task to prune L1 tracking data is run. Defaults to 10 minutes. |
capacity | float | 1 | Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. This is just a suggestion, there is no guarantee that a node with a capacity factor of 2 will have twice as many entries as a node with a capacity factor of 1. |
consistent-hash-factory | string | The factory to use for generating the consistent hash. Must implement org.infinispan.distribution.ch.ConsistentHashFactory. This option can be used to guarantee that multiple distributed caches use exactly the same consistent hash, which for performance reasons is not guaranteed by the default consistent hash factory instance used. |
state-transfer?
The state transfer configuration for distribution and replicated caches.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | If enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time. |
timeout | long | 60000 | The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup. |
chunk-size | integer | 512 | The number of cache entries to batch in each transfer. |
await-initial-transfer | boolean | true | If enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests. |
groups?
Configures grouping of data.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | Enables or disables grouping. |
grouper*
Name | Type | Default | Description |
---|---|---|---|
class | string | The class to use to group keys. Must implement org.infinispan.distribution.group.Grouper. |
Name | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
async-marshalling | boolean | false | Enables the use of asynchronous marshalling | ||||
mode |
|
Sets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation. | |||||
queue-size | int | 0 | In ASYNC mode, this attribute can be used to trigger flushing of the queue when it reaches a specific threshold. A value of 0 (the default) disables the replication queue. | ||||
queue-flush-interval | long | 10 | In ASYNC mode, 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. | ||||
remote-timeout | long | 15000 | In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown. |
backups?
The state transfer configuration for distribution and replicated caches.
backup+
Configures a specific site where this cache backups data.
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
site | string | Name of the remote site where this cache backups data. | |||||||
strategy |
|
ASYNC | The strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC" | ||||||
failure-policy |
|
WARN | Decides what the system would do in case of failure during backup. Defaults to "FAIL" | ||||||
timeout | long | 10000 | The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs. | ||||||
enabled | boolean | true | If 'false' then no data is backed up to this site. Defaults to 'true'. | ||||||
two-phase-commit | boolean | false | Whether a backup will use a 2PC cycle for SYNC backups. Defaults to "false". NOTE: Not used for ASYNC backup strategies. | ||||||
failure-policy-class | string | If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy. |
take-offline?
Determines whether this backup is taken offline (ignored) after a certain number of tries.
Name | Type | Default | Description |
---|---|---|---|
after-failures | int | 0 | The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'. |
min-wait | long | 0 | The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered. |
state-transfer?
Configures the properties needed to transfer the state for this site.
Name | Type | Default | Description |
---|---|---|---|
chunk-size | int | 512 | If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512. |
timeout | long | 1200000 | The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min. |
max-retries | int | 30 | The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30. |
wait-time | long | 2000 | The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds. |
backup-for?
Configures this cache as a backup for a remote cache.
Name | Type | Default | Description |
---|---|---|---|
remote-cache | string | The name of the remote cache that backups data here. | |
remote-site | string | The name of the remote site containing the cache that backups data here. |
partition-handling?
Configures the way this cache reacts to node crashes and split brains.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | Enable/disable the partition handling functionality. Defaults to false. |
Name | Type | Default | Description |
---|---|---|---|
name | string | Uniquely identifies this cache within its cache container. | |
start | FIXME | Unused XML attribute | |
jndi-name | string | Unused XML attribute | |
module | string | Unused XML attribute | |
statistics | boolean | true | Determines whether or not the cache should collect statistics. Keep disabled for optimal performance. |
deadlock-detection-spin | long | 100 | Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock. Defaults to 100ms. |
unreliable-return-values | boolean | false | Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods. |
locking?
The locking configuration of the cache.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isolation |
|
READ_COMMITTED | Sets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level. | ||||||||||
striping | boolean | false | 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. | ||||||||||
acquire-timeout | long | 10000 | Maximum time to attempt a particular lock acquisition. | ||||||||||
concurrency-level | int | 32 | Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan. | ||||||||||
write-skew | 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. Defaults to false. |
transaction?
The cache transaction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mode |
|
NONE | Sets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA. | ||||||||||
stop-timeout | long | 30000 | If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout. | ||||||||||
locking |
|
OPTIMISTIC | The locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC. | ||||||||||
transaction-manager-lookup | string | org.infinispan.transaction.lookup.GenericTransactionManagerLookup.GenericTransactionManagerLookup | Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional. | ||||||||||
complete-timeout | long | 60000 | The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000. | ||||||||||
reaper-interval | long | 30000 | The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000. | ||||||||||
auto-commit | boolean | true | If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true. | ||||||||||
protocol |
|
Configures the commit protocol to use. | |||||||||||
recovery-cache | string | __recoveryInfoCacheName__ | Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__" |
eviction?
The cache eviction configuration.
Name | Type | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strategy |
|
NONE | Sets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction). | ||||||||||
max-entries | 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. | ||||||||||
thread-policy |
|
DEFAULT | Threading policy for eviction. Defaults to using the DEFAULT eviction policy. |
expiration?
The cache expiration configuration.
Name | Type | Default | Description |
---|---|---|---|
max-idle | 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. |
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. |
interval | long | 60000 | Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1. |
compatibility?
The cache compatibility mode configuration.
Name | Type | Default | Description |
---|---|---|---|
marshaller | string | A marshaller to use for compatibility conversions. |
store-as-binary?
Configures the cache to store data in binary format.
Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both.Name | Type | Default | Description |
---|---|---|---|
keys | boolean | true | Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
values | boolean | true | Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true. |
persistence?
Configures the cache's persistence layer.
Name | Type | Default | Description |
---|---|---|---|
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. Defaults to false. |
versioning?
Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.
Name | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
scheme |
|
NONE | The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE |
data-container?
Controls the data container for the cache.
Name | Type | Default | Description |
---|---|---|---|
class | string | Fully qualified class name of the data container to use | |
key-equivalence | string | Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys | |
value-equivalence | string | Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values |
property*
Properties passed to the data container
modules?
This element contains configuration options for additional modules which affect cache configuration
indexing?
defined indexing options for cache
Name | Type | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
index |
|
NONE | The indexing mode of the cache. Defaults to NONE. | ||||||
auto-config | boolean | false | Whether or not to apply automatic index configuration based on cache type |
property*
Property to pass on to the indexing system
custom-interceptors?
Configures custom interceptors to be added to the cache.
interceptor*
Name | Type | Default | Description |
---|---|---|---|
after | string | Dictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
before | string | Dictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts. | |
class | string | A fully qualified class name of the new custom interceptor to add to the configuration. | |
index | int | Specifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain. | |
position | string | Specifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST |
property?
security?
Configures cache-level security.
authorization?
Configures authorization for this cache.
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enables authorization checks for this cache. Defaults to true if the authorization element is present. |
roles | Sets the valid roles required to access this cache. |