8.4.4.5. Configure the Distributed Data Grid
JBoss Data Grid's distributed mode ensures that each entry is stored on a subset of the total nodes in the data grid. The number of nodes in the subset is controlled by the numOwners parameter to indicate how many "owners" each entry has.
Distributed mode offers increased storage capacity but increased access times and less durability (protection against node failures). Adjust the numOwners value to set the desired trade off between space, durability and availability. Durability is further improved by JBoss Data Grid's topology aware consistent hash, which locates entry owners across a variety of data centers, racks and nodes.
Programmatic Configuration:
Use the following code snippet to programmatically configure the cache for distributed mode (either synchronous or asynchronous):
Declarative Configuration:
Edit the cfg.xml file to include the following XML code to declaratively configure the cache for distributed mode (either synchronous or asynchronous):