Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 6. Cache Modes
- Local mode is the only non-clustered cache mode offered in JBoss Data Grid. In local mode, JBoss Data Grid operates as a simple single-node in-memory data cache. Local mode is most effective when scalability and failover are not required and provides high performance in comparison with clustered modes.
- Clustered mode replicates state changes to a small subset of nodes. The subset size is sufficient for fault tolerance purposes but not large enough to hinder scalability. Before attempting to use clustered mode, it is important to first configure JGroups for a clustered configuration. For details about configuring JGroups, see Section 24.3, “Configure JGroups (Library Mode)”
6.1. About Cache Containers Link kopierenLink in die Zwischenablage kopiert!
cache-container element acts as a parent of one or more (local or clustered) caches. To add clustered caches to the container, transport must be defined.
Procedure 6.1. How to Configure the Cache Container
Specify the Cache Container
Thecache-containerelement specifies information about the cache container using the following parameters:<subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="default">
<subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="default">Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Cache Container Name
Thenameparameter defines the name of the cache container.<subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="default"> <cache-container name="default" />
<subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="default"> <cache-container name="default" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the Default Cache
Thedefault-cacheparameter defines the name of the default cache used with the cache container.<subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="default"> <cache-container name="default" default-cache="default" />
<subsystem xmlns="urn:infinispan:server:core:6.0" default-cache-container="default"> <cache-container name="default" default-cache="default" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable/Disable Statistics
Thestatisticsattribute is optional and istrueby default. Statistics are useful in monitoring JBoss Data Grid via JMX or JBoss Operations Network, however they adversely affect performance. Disable this attribute by setting it tofalseif it is not required.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the Listener Executor
Thelistener-executordefines the executor used for asynchronous cache listener notifications.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Cache Container Start Mode
Thestartparameter indicates when the cache container starts, i.e. whether it will start lazily when requested or "eagerly" when the server starts up. Valid values for this parameter areEAGERandLAZY.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Per-cache Statistics
Ifstatisticsare enabled at the container level, per-cache statistics can be selectively disabled for caches that do not require monitoring by setting thestatisticsattribute tofalse.Copy to Clipboard Copied! Toggle word wrap Toggle overflow