Package akka.cluster.sbr
Class DowningStrategy
- java.lang.Object
-
- akka.cluster.sbr.DowningStrategy
-
- Direct Known Subclasses:
DownAllNodes
,KeepMajority
,KeepOldest
,LeaseMajority
,StaticQuorum
public abstract class DowningStrategy extends java.lang.Object
INTERNAL API
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DowningStrategy.AcquireLeaseAndDownIndirectlyConnected
static class
DowningStrategy.AcquireLeaseAndDownIndirectlyConnected$
static class
DowningStrategy.AcquireLeaseAndDownUnreachable
static class
DowningStrategy.AcquireLeaseAndDownUnreachable$
static interface
DowningStrategy.AcquireLeaseDecision
static interface
DowningStrategy.Decision
static class
DowningStrategy.DownAll$
static class
DowningStrategy.DownIndirectlyConnected$
static class
DowningStrategy.DownReachable$
static class
DowningStrategy.DownUnreachable$
static class
DowningStrategy.ReverseDownIndirectlyConnected$
-
Constructor Summary
Constructors Constructor Description DowningStrategy(java.lang.String selfDc)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
add(Member m)
void
addReachable(Member m)
void
addUnreachable(Member m)
scala.collection.immutable.SortedSet<Member>
allMembersInDC()
abstract DowningStrategy.Decision
decide()
boolean
hasIndirectlyConnected()
scala.collection.immutable.Set<UniqueAddress>
indirectlyConnected()
Nodes that are marked as unreachable but can communicate with gossip via a 3rd party.boolean
isAllUnreachableDownOrExiting()
scala.collection.immutable.SortedSet<Member>
joining()
scala.Option<Lease>
lease()
scala.collection.immutable.SortedSet<Member>
members()
All members in self DC, but doesn't contain Joining, WeaklyUp, Down and Exiting.scala.collection.immutable.SortedSet<Member>
members(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
All members in self DC, but doesn't contain Joining, WeaklyUp, Down and Exiting.scala.collection.immutable.SortedSet<Member>
membersWithRole()
scala.collection.immutable.SortedSet<Member>
membersWithRole(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
scala.collection.immutable.Set<UniqueAddress>
nodesToDown(DowningStrategy.Decision decision)
DowningStrategy.Decision
nodesToDown$default$1()
protected scala.math.Ordering<Member>
ordering()
Reachability
reachability()
scala.collection.immutable.SortedSet<Member>
reachableMembers()
scala.collection.immutable.SortedSet<Member>
reachableMembers(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
scala.collection.immutable.SortedSet<Member>
reachableMembersWithRole()
scala.collection.immutable.SortedSet<Member>
reachableMembersWithRole(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
void
remove(Member m)
DowningStrategy.Decision
reverseDecision(DowningStrategy.Decision decision)
abstract scala.Option<java.lang.String>
role()
scala.collection.immutable.Set<Address>
seenBy()
java.lang.String
selfDc()
boolean
setReachability(Reachability r)
void
setSeenBy(scala.collection.immutable.Set<Address> s)
scala.collection.immutable.Set<UniqueAddress>
unreachable()
boolean
unreachable(Member m)
scala.collection.immutable.Set<UniqueAddress>
unreachableButNotIndirectlyConnected()
scala.collection.immutable.SortedSet<Member>
unreachableMembers()
scala.collection.immutable.SortedSet<Member>
unreachableMembers(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
scala.collection.immutable.SortedSet<Member>
unreachableMembersWithRole()
scala.collection.immutable.SortedSet<Member>
unreachableMembersWithRole(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
-
-
-
Method Detail
-
selfDc
public java.lang.String selfDc()
-
unreachable
public scala.collection.immutable.Set<UniqueAddress> unreachable()
-
unreachable
public boolean unreachable(Member m)
-
ordering
protected scala.math.Ordering<Member> ordering()
-
role
public abstract scala.Option<java.lang.String> role()
-
joining
public scala.collection.immutable.SortedSet<Member> joining()
-
allMembersInDC
public scala.collection.immutable.SortedSet<Member> allMembersInDC()
-
members
public scala.collection.immutable.SortedSet<Member> members()
All members in self DC, but doesn't contain Joining, WeaklyUp, Down and Exiting.
-
members
public scala.collection.immutable.SortedSet<Member> members(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
All members in self DC, but doesn't contain Joining, WeaklyUp, Down and Exiting.When
includingPossiblyUp=true
it also includes Joining and WeaklyUp members that could have been changed to Up on the other side of a partition.When
excludingPossiblyExiting=true
it doesn't include Leaving members that could have been changed to Exiting on the other side of the partition.
-
membersWithRole
public scala.collection.immutable.SortedSet<Member> membersWithRole()
-
membersWithRole
public scala.collection.immutable.SortedSet<Member> membersWithRole(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
-
reachableMembers
public scala.collection.immutable.SortedSet<Member> reachableMembers()
-
reachableMembers
public scala.collection.immutable.SortedSet<Member> reachableMembers(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
-
reachableMembersWithRole
public scala.collection.immutable.SortedSet<Member> reachableMembersWithRole()
-
reachableMembersWithRole
public scala.collection.immutable.SortedSet<Member> reachableMembersWithRole(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
-
unreachableMembers
public scala.collection.immutable.SortedSet<Member> unreachableMembers()
-
unreachableMembers
public scala.collection.immutable.SortedSet<Member> unreachableMembers(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
-
unreachableMembersWithRole
public scala.collection.immutable.SortedSet<Member> unreachableMembersWithRole()
-
unreachableMembersWithRole
public scala.collection.immutable.SortedSet<Member> unreachableMembersWithRole(boolean includingPossiblyUp, boolean excludingPossiblyExiting)
-
addUnreachable
public void addUnreachable(Member m)
-
addReachable
public void addReachable(Member m)
-
add
public void add(Member m)
-
remove
public void remove(Member m)
-
reachability
public Reachability reachability()
-
setReachability
public boolean setReachability(Reachability r)
- Returns:
- true if it was changed
-
seenBy
public scala.collection.immutable.Set<Address> seenBy()
-
setSeenBy
public void setSeenBy(scala.collection.immutable.Set<Address> s)
-
indirectlyConnected
public scala.collection.immutable.Set<UniqueAddress> indirectlyConnected()
Nodes that are marked as unreachable but can communicate with gossip via a 3rd party.Cycle in unreachability graph corresponds to that some node is both observing another node as unreachable, and is also observed as unreachable by someone else.
Another indication of indirectly connected nodes is if a node is marked as unreachable, but it has still marked current gossip state as seen.
Those cases will not happen for clean splits and crashed nodes.
-
hasIndirectlyConnected
public boolean hasIndirectlyConnected()
-
unreachableButNotIndirectlyConnected
public scala.collection.immutable.Set<UniqueAddress> unreachableButNotIndirectlyConnected()
-
nodesToDown
public scala.collection.immutable.Set<UniqueAddress> nodesToDown(DowningStrategy.Decision decision)
-
nodesToDown$default$1
public DowningStrategy.Decision nodesToDown$default$1()
-
isAllUnreachableDownOrExiting
public boolean isAllUnreachableDownOrExiting()
-
reverseDecision
public DowningStrategy.Decision reverseDecision(DowningStrategy.Decision decision)
-
decide
public abstract DowningStrategy.Decision decide()
-
lease
public scala.Option<Lease> lease()
-
-