2.6. 配置自动缓存重新平衡
默认情况下,Data Grid 会自动重新平衡缓存作为节点加入并离开集群。您可以通过在 Cache Manager 级别或基于每个缓存级别禁用或启用它来配置自动缓存重新平衡。
流程
- 创建与 Data Grid 的 CLI 连接。
使用
rebalance disable命令为所有缓存禁用自动重新平衡。rebalance disable
rebalance disableCopy to Clipboard Copied! Toggle word wrap Toggle overflow 使用
rebalance enable命令为特定缓存启用自动重新平衡。以下示例仅为名为 "mycache" 的缓存启用重新平衡。
rebalance enable caches/mycache
rebalance enable caches/mycacheCopy to Clipboard Copied! Toggle word wrap Toggle overflow 为所有缓存重新启用自动重新平衡。
rebalance enable
rebalance enableCopy to Clipboard Copied! Toggle word wrap Toggle overflow
如需有关 rebalance 命令的更多信息,请运行 help rebalance。