public interface RebalancePolicy
ClusterTopologyManager.triggerRebalance(String).
They don't control the resulting consistent hash directly, but they can use the ClusterCacheStatus
to access the cache's custom ConsistentHashFactory implementation
and influence the generated consistent hash indirectly.| Modifier and Type | Method and Description |
|---|---|
void |
initCache(String cacheName,
ClusterCacheStatus cacheStatus)
Initialize the policy for a cache, without a list of members.
|
boolean |
isRebalancingEnabled() |
void |
setRebalancingEnabled(boolean enabled) |
void |
updateCacheStatus(String cacheName,
ClusterCacheStatus cacheStatus)
Called when the status of a cache changes.
|
void initCache(String cacheName, ClusterCacheStatus cacheStatus) throws Exception
Exceptionvoid updateCacheStatus(String cacheName, ClusterCacheStatus cacheStatus) throws Exception
Exceptionboolean isRebalancingEnabled()
true if rebalancing is allowed, false if rebalancing is suspended.void setRebalancingEnabled(boolean enabled)
enabled - true to start rebalancing (immediately starting the rebalance if necessary),
false to suspend it.Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.