Record Class PartitionDetector.PartitionRecoveryPlan
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.PartitionDetector.PartitionRecoveryPlan
- Record Components:
survivingClique- largest mutually reachable member setisolatedNodes- members outside the surviving cliqueallNodes- all members considered by the planlocalNodeInSurvivingClique- whether the local node belongs to the surviving clique
- Enclosing class:
PartitionDetector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallNodes()Returns the value of theallNodesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisolatedNodesrecord component.booleanReturns the value of thelocalNodeInSurvivingCliquerecord component.intReturns the value of thesurvivingCliquerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PartitionRecoveryPlan
public PartitionRecoveryPlan(Set<String> survivingClique, Set<String> isolatedNodes, Set<String> allNodes, boolean localNodeInSurvivingClique) Creates an instance of aPartitionRecoveryPlanrecord class.- Parameters:
survivingClique- the value for thesurvivingCliquerecord componentisolatedNodes- the value for theisolatedNodesrecord componentallNodes- the value for theallNodesrecord componentlocalNodeInSurvivingClique- the value for thelocalNodeInSurvivingCliquerecord component
-
-
Method Details
-
quorumSize
public int quorumSize() -
hasQuorum
public boolean hasQuorum() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
survivingClique
Returns the value of thesurvivingCliquerecord component.- Returns:
- the value of the
survivingCliquerecord component
-
isolatedNodes
Returns the value of theisolatedNodesrecord component.- Returns:
- the value of the
isolatedNodesrecord component
-
allNodes
-
localNodeInSurvivingClique
public boolean localNodeInSurvivingClique()Returns the value of thelocalNodeInSurvivingCliquerecord component.- Returns:
- the value of the
localNodeInSurvivingCliquerecord component
-