Class KeepOldest
- java.lang.Object
-
- akka.cluster.sbr.DowningStrategy
-
- akka.cluster.sbr.KeepOldest
-
public final class KeepOldest extends DowningStrategy
INTERNAL APIDown the part that does not contain the oldest member (current singleton).
There is one exception to this rule if
downIfAlone
is defined totrue
. Then, if the oldest node has partitioned from all other nodes the oldest will down itself and keep all other nodes running. The strategy will not down the single oldest node when it is the only remaining node in the cluster.Note that if the oldest node crashes the others will remove it from the cluster when
downIfAlone
istrue
, otherwise they will down themselves if the oldest node crashes, i.e. shutdown the whole cluster together with the oldest node.If the
role
is defined the decision is based only on members with thatrole
, i.e. using the oldest member (singleton) within the nodes with that role.It is only using members within the own data center, i.e. oldest within the 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 KeepOldest(java.lang.String selfDc, boolean downIfAlone, 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
downIfAlone()
scala.math.Ordering<Member>
ordering()
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, reachability, reachableMembers, reachableMembers, reachableMembersWithRole, reachableMembersWithRole, remove, reverseDecision, seenBy, selfDc, setReachability, setSeenBy, unreachable, unreachable, unreachableButNotIndirectlyConnected, unreachableMembers, unreachableMembers, unreachableMembersWithRole, unreachableMembersWithRole
-
-
-
-
Constructor Detail
-
KeepOldest
public KeepOldest(java.lang.String selfDc, boolean downIfAlone, scala.Option<java.lang.String> role, UniqueAddress selfUniqueAddress)
-
-
Method Detail
-
decide
public DowningStrategy.Decision decide()
- Specified by:
decide
in classDowningStrategy
-
downIfAlone
public boolean downIfAlone()
-
ordering
public scala.math.Ordering<Member> ordering()
- Overrides:
ordering
in classDowningStrategy
-
role
public scala.Option<java.lang.String> role()
- Specified by:
role
in classDowningStrategy
-
-