Class PreferConsistencyStrategy
- java.lang.Object
-
- org.infinispan.partitionhandling.impl.PreferConsistencyStrategy
-
- All Implemented Interfaces:
AvailabilityStrategy
public class PreferConsistencyStrategy extends Object implements AvailabilityStrategy
-
-
Constructor Summary
Constructors Constructor Description PreferConsistencyStrategy(EventLogManager eventLogManager, PersistentUUIDManager persistentUUIDManager, LostDataCheck lostDataCheck)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisMinorityPartition(List<Address> stableMembers, List<Address> lostMembers)voidonClusterViewChange(AvailabilityStrategyContext context, List<Address> clusterMembers)Called when the cluster view changed (e.g.voidonGracefulLeave(AvailabilityStrategyContext context, Address leaver)Called when a node leaves gracefully.voidonJoin(AvailabilityStrategyContext context, Address joiner)Called when a node joins.voidonManualAvailabilityChange(AvailabilityStrategyContext context, AvailabilityMode newAvailabilityMode)Called when the administrator manually changes the availability status.voidonPartitionMerge(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.voidonRebalanceEnd(AvailabilityStrategyContext context)Called when a rebalance ends.
-
-
-
Constructor Detail
-
PreferConsistencyStrategy
public PreferConsistencyStrategy(EventLogManager eventLogManager, PersistentUUIDManager persistentUUIDManager, LostDataCheck lostDataCheck)
-
-
Method Detail
-
onJoin
public void onJoin(AvailabilityStrategyContext context, Address joiner)
Description copied from interface:AvailabilityStrategyCalled when a node joins.- Specified by:
onJoinin interfaceAvailabilityStrategy
-
onGracefulLeave
public void onGracefulLeave(AvailabilityStrategyContext context, Address leaver)
Description copied from interface:AvailabilityStrategyCalled when a node leaves gracefully.- Specified by:
onGracefulLeavein interfaceAvailabilityStrategy
-
onClusterViewChange
public void onClusterViewChange(AvailabilityStrategyContext context, List<Address> clusterMembers)
Description copied from interface:AvailabilityStrategyCalled when the cluster view changed (e.g. because one or more nodes left abruptly).- Specified by:
onClusterViewChangein interfaceAvailabilityStrategy
-
isMinorityPartition
protected boolean isMinorityPartition(List<Address> stableMembers, List<Address> lostMembers)
-
onPartitionMerge
public void onPartitionMerge(AvailabilityStrategyContext context, Map<Address,CacheStatusResponse> statusResponseMap)
Description copied from interface:AvailabilityStrategyCalled when two or more partitions merge, to compute the stable and current cache topologies for the merged cluster.- Specified by:
onPartitionMergein interfaceAvailabilityStrategy
-
onRebalanceEnd
public void onRebalanceEnd(AvailabilityStrategyContext context)
Description copied from interface:AvailabilityStrategyCalled when a rebalance ends. Can be used to re-assess the state of the cache and apply pending changes.- Specified by:
onRebalanceEndin interfaceAvailabilityStrategy
-
onManualAvailabilityChange
public void onManualAvailabilityChange(AvailabilityStrategyContext context, AvailabilityMode newAvailabilityMode)
Description copied from interface:AvailabilityStrategyCalled when the administrator manually changes the availability status.- Specified by:
onManualAvailabilityChangein interfaceAvailabilityStrategy
-
-