public interface AvailabilityStrategy
AvailabilityStrategyContext methods.
The strategy can also queue actions until the current rebalance ends, and execute them on
onRebalanceEnd(AvailabilityStrategyContext).
Method invocations are synchronized, so it's not possible to have concurrent invocations.| Modifier and Type | Method and Description |
|---|---|
void |
onClusterViewChange(AvailabilityStrategyContext context,
List<Address> clusterMembers)
Called when the cluster view changed (e.g.
|
void |
onGracefulLeave(AvailabilityStrategyContext context,
Address leaver)
Called when a node leaves gracefully.
|
void |
onJoin(AvailabilityStrategyContext context,
Address joiner)
Called when a node joins.
|
void |
onManualAvailabilityChange(AvailabilityStrategyContext context,
AvailabilityMode newAvailabilityMode)
Called when the administrator manually changes the availability status.
|
void |
onPartitionMerge(AvailabilityStrategyContext context,
Map<Address,CacheStatusResponse> statusResponseMap)
Called when two or more partitions merge, to compute the stable and current cache topologies for the merged
cluster.
|
void |
onRebalanceEnd(AvailabilityStrategyContext context)
Called when a rebalance ends.
|
static ConsistentHash |
ownersConsistentHash(CacheTopology topology,
ConsistentHashFactory chFactory)
Compute the read consistent hash for a topology with a
null union consistent hash. |
static ConsistentHash ownersConsistentHash(CacheTopology topology, ConsistentHashFactory chFactory)
null union consistent hash.
Originally a copy of CacheTopology.getReadConsistentHash() but differs in case of scattered cache.void onJoin(AvailabilityStrategyContext context, Address joiner)
void onGracefulLeave(AvailabilityStrategyContext context, Address leaver)
void onClusterViewChange(AvailabilityStrategyContext context, List<Address> clusterMembers)
void onPartitionMerge(AvailabilityStrategyContext context, Map<Address,CacheStatusResponse> statusResponseMap)
void onRebalanceEnd(AvailabilityStrategyContext context)
void onManualAvailabilityChange(AvailabilityStrategyContext context, AvailabilityMode newAvailabilityMode)
Copyright © 2022 JBoss by Red Hat. All rights reserved.