Class StaticQuorum
- java.lang.Object
-
- akka.cluster.sbr.DowningStrategy
-
- akka.cluster.sbr.StaticQuorum
-
public final class StaticQuorum extends DowningStrategy
INTERNAL APIDown the unreachable nodes if the number of remaining nodes are greater than or equal to the given
quorumSize
. Otherwise down the reachable nodes, i.e. it will shut down that side of the partition. In other words, thequorumSize
defines the minimum number of nodes that the cluster must have to be operational. If there are unreachable nodes when starting up the cluster, before reaching this limit, the cluster may shutdown itself immediately. This is not an issue if you start all nodes at approximately the same time.Note that you must not add more members to the cluster than
quorumSize * 2 - 1
, because then both sides may down each other and thereby form two separate clusters. For example, quorum quorumSize configured to 3 in a 6 node cluster may result in a split where each side consists of 3 nodes each, i.e. each side thinks it has enough nodes to continue by itself. A warning is logged if this recommendation is violated.If the
role
is defined the decision is based only on members with thatrole
.It is only counting members within the own data center.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.cluster.sbr.DowningStrategy
DowningStrategy.AcquireLeaseAndDownIndirectlyConnected, DowningStrategy.AcquireLeaseAndDownIndirectlyConnected$, DowningStrategy.AcquireLeaseAndDownUnreachable, DowningStrategy.AcquireLeaseAndDownUnreachable$, DowningStrategy.AcquireLeaseDecision, DowningStrategy.Decision, DowningStrategy.DownAll$, DowningStrategy.DownIndirectlyConnected$, DowningStrategy.DownReachable$, DowningStrategy.DownSelfQuarantinedByRemote$, DowningStrategy.DownUnreachable$, DowningStrategy.ReverseDownIndirectlyConnected$
-
-
Constructor Summary
Constructors Constructor Description StaticQuorum(java.lang.String selfDc, int quorumSize, scala.Option<java.lang.String> role, UniqueAddress selfUniqueAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DowningStrategy.Decision
decide()
boolean
isTooManyMembers()
int
quorumSize()
scala.Option<java.lang.String>
role()
-
Methods inherited from class akka.cluster.sbr.DowningStrategy
add, addReachable, addUnreachable, allMembersInDC, hasIndirectlyConnected, indirectlyConnected, isAllUnreachableDownOrExiting, joining, lease, members, members, membersWithRole, membersWithRole, nodesToDown, nodesToDown$default$1, ordering, reachability, reachableMembers, reachableMembers, reachableMembersWithRole, reachableMembersWithRole, remove, reverseDecision, seenBy, selfDc, setReachability, setSeenBy, unreachable, unreachable, unreachableButNotIndirectlyConnected, unreachableMembers, unreachableMembers, unreachableMembersWithRole, unreachableMembersWithRole
-
-
-
-
Constructor Detail
-
StaticQuorum
public StaticQuorum(java.lang.String selfDc, int quorumSize, scala.Option<java.lang.String> role, UniqueAddress selfUniqueAddress)
-
-
Method Detail
-
decide
public DowningStrategy.Decision decide()
- Specified by:
decide
in classDowningStrategy
-
isTooManyMembers
public boolean isTooManyMembers()
-
quorumSize
public int quorumSize()
-
role
public scala.Option<java.lang.String> role()
- Specified by:
role
in classDowningStrategy
-
-