8.3. Configure Replication Mode (Remote Client-Server Mode)
Replication mode is a clustered cache mode in Red Hat JBoss Data Grid. Replication mode can be added to any cache container using the following procedure.
Procedure 8.1. The replicated-cache Element
The
replicated-cache element configures settings for the distributed cache using the following parameters:
Add the Cache Name
Thenameparameter provides a unique identifier for the cache.<cache-container name="clustered" default-cache="default" statistics="true"> <replicated-cache name="default">
<cache-container name="clustered" default-cache="default" statistics="true"> <replicated-cache name="default">Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Clustered Cache Start Mode
Themodeparameter sets the clustered cache mode. Valid values areSYNC(synchronous) andASYNC(asynchronous).<cache-container name="clustered" default-cache="default" statistics="true"> <replicated-cache name="default" mode="SYNC">
<cache-container name="clustered" default-cache="default" statistics="true"> <replicated-cache name="default" mode="SYNC">Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Cache Start Mode
Thestartparameter specifies whether the cache starts when the server starts up or when it is requested or deployed.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 Set Up Transactions
Thetransactionelement sets up the transaction mode for the replicated cache.Important
In Remote Client-Server mode, the transactions element is set toNONEunless JBoss Data Grid is used in a compatibility mode where the cluster contains both JBoss Data Grid server and library instances. In this case, if transactions are configured in the library mode instance, they must also be configured in the server instance.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Important
JGroups must be appropriately configured for clustered mode before attempting to load this configuration.
For details about the
cache-container and locking, see the appropriate chapter.