public class PreferAvailabilityStrategy extends Object implements AvailabilityStrategy
| Constructor and Description |
|---|
PreferAvailabilityStrategy(EventLogManager eventLogManager,
PersistentUUIDManager persistentUUIDManager,
LostDataCheck lostDataCheck) |
| Modifier and Type | Method and Description |
|---|---|
CacheTopology |
computePreferredTopology(Map<Address,CacheStatusResponse> statusResponseMap)
Ignore the AvailabilityStrategyContext and only compute the preferred topology for testing.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitownersConsistentHashpublic PreferAvailabilityStrategy(EventLogManager eventLogManager, PersistentUUIDManager persistentUUIDManager, LostDataCheck lostDataCheck)
public void onJoin(AvailabilityStrategyContext context, Address joiner)
AvailabilityStrategyonJoin in interface AvailabilityStrategypublic void onGracefulLeave(AvailabilityStrategyContext context, Address leaver)
AvailabilityStrategyonGracefulLeave in interface AvailabilityStrategypublic void onClusterViewChange(AvailabilityStrategyContext context, List<Address> clusterMembers)
AvailabilityStrategyonClusterViewChange in interface AvailabilityStrategypublic void onPartitionMerge(AvailabilityStrategyContext context, Map<Address,CacheStatusResponse> statusResponseMap)
AvailabilityStrategyonPartitionMerge in interface AvailabilityStrategypublic CacheTopology computePreferredTopology(Map<Address,CacheStatusResponse> statusResponseMap)
null if there is no preferred topology.public void onRebalanceEnd(AvailabilityStrategyContext context)
AvailabilityStrategyonRebalanceEnd in interface AvailabilityStrategypublic void onManualAvailabilityChange(AvailabilityStrategyContext context, AvailabilityMode newAvailabilityMode)
AvailabilityStrategyonManualAvailabilityChange in interface AvailabilityStrategyCopyright © 2022 JBoss by Red Hat. All rights reserved.