public class ClusterCoreDaemon
extends java.lang.Object
implements akka.actor.Actor, akka.actor.ActorLogging, akka.dispatch.RequiresMessageQueue<akka.dispatch.UnboundedMessageQueueSemantics>
Modifier and Type | Class and Description |
---|---|
class |
ClusterCoreDaemon.Ignored |
class |
ClusterCoreDaemon.Merge |
class |
ClusterCoreDaemon.Newer |
class |
ClusterCoreDaemon.Older |
static interface |
ClusterCoreDaemon.ReceiveGossipType
The types of gossip actions that receive gossip has performed.
|
class |
ClusterCoreDaemon.Same |
Constructor and Description |
---|
ClusterCoreDaemon(akka.actor.ActorRef publisher) |
Modifier and Type | Method and Description |
---|---|
double |
adjustedGossipDifferentViewProbability()
For large clusters we should avoid shooting down individual
nodes.
|
void |
assertLatestGossip() |
void |
becomeInitialized() |
void |
becomeUninitialized() |
Cluster |
cluster() |
void |
downing(akka.actor.Address address)
State transition to DOWN.
|
akka.actor.Cancellable |
failureDetectorReaperTask() |
void |
gossip()
Initiates a new round of gossip.
|
void |
gossipSpeedupTick() |
GossipStats |
gossipStats() |
void |
gossipStatusTo(UniqueAddress node) |
void |
gossipStatusTo(UniqueAddress node,
akka.actor.ActorRef destination) |
akka.actor.Cancellable |
gossipTask() |
void |
gossipTick() |
void |
gossipTo(UniqueAddress node)
Gossips latest gossip to a node.
|
void |
gossipTo(UniqueAddress node,
akka.actor.ActorRef destination) |
akka.cluster.ClusterCoreDaemon.Ignored$ |
Ignored() |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
initialized() |
void |
initJoin() |
boolean |
isGossipSpeedupNeeded() |
boolean |
isMinNrOfMembersFulfilled() |
boolean |
isSingletonCluster() |
void |
join(akka.actor.Address address)
Try to join this cluster node with the node specified by
address . |
void |
joining(UniqueAddress node,
scala.collection.immutable.Set<java.lang.String> roles)
State transition to JOINING - new node joining.
|
void |
joinSeedNodes(scala.collection.immutable.IndexedSeq<akka.actor.Address> newSeedNodes) |
Gossip |
latestGossip() |
int |
leaderActionCounter() |
void |
leaderActions()
Runs periodic leader actions, such as member status transitions, assigning partitions etc.
|
void |
leaderActionsOnConvergence()
Leader actions are as follows:
1.
|
akka.actor.Cancellable |
leaderActionsTask() |
void |
leaving(akka.actor.Address address)
State transition to LEAVING.
|
int |
MaxGossipsBeforeShuttingDownMyself() |
akka.cluster.ClusterCoreDaemon.Merge$ |
Merge() |
void |
moveJoiningToWeaklyUp() |
akka.cluster.ClusterCoreDaemon.Newer$ |
Newer() |
int |
NumberOfGossipsBeforeShutdownWhenLeaderExits() |
akka.cluster.ClusterCoreDaemon.Older$ |
Older() |
void |
postStop() |
void |
preStart() |
void |
publish(Gossip newGossip) |
void |
publishInternalStats() |
scala.Option<akka.actor.Cancellable> |
publishStatsTask() |
void |
quarantined(UniqueAddress node) |
void |
reapUnreachableMembers()
Reaps the unreachable members according to the failure detector's verdict.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive() |
ClusterCoreDaemon.ReceiveGossipType |
receiveGossip(GossipEnvelope envelope)
Receive new gossip.
|
void |
receiveGossipStatus(GossipStatus status) |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
removed() |
akka.cluster.ClusterCoreDaemon.Same$ |
Same() |
scala.Option<akka.actor.ActorRef> |
seedNodeProcess() |
int |
seedNodeProcessCounter() |
scala.collection.immutable.IndexedSeq<akka.actor.Address> |
seedNodes() |
scala.Option<UniqueAddress> |
selectRandomNode(scala.collection.IndexedSeq<UniqueAddress> nodes) |
protected UniqueAddress |
selfUniqueAddress() |
void |
sendGossipTo(akka.actor.Address address) |
void |
shutdown()
This method is called when a member sees itself as Exiting or Down.
|
void |
shutdownSelfWhenDown() |
boolean |
statsEnabled() |
void |
stopSeedNodeProcess() |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
tryingToJoin(akka.actor.Address joinWith,
scala.Option<scala.concurrent.duration.Deadline> deadline) |
void |
unhandled(java.lang.Object message) |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
uninitialized() |
void |
updateLatestGossip(Gossip newGossip) |
boolean |
validNodeForGossip(UniqueAddress node) |
java.lang.String |
vclockName(UniqueAddress node) |
java.lang.String |
vclockNode() |
void |
welcome(akka.actor.Address joinWith,
UniqueAddress from,
Gossip gossip)
Reply from Join request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Cluster cluster()
protected UniqueAddress selfUniqueAddress()
public int NumberOfGossipsBeforeShutdownWhenLeaderExits()
public int MaxGossipsBeforeShuttingDownMyself()
public java.lang.String vclockName(UniqueAddress node)
public java.lang.String vclockNode()
public Gossip latestGossip()
public boolean statsEnabled()
public GossipStats gossipStats()
public scala.collection.immutable.IndexedSeq<akka.actor.Address> seedNodes()
public scala.Option<akka.actor.ActorRef> seedNodeProcess()
public int seedNodeProcessCounter()
public int leaderActionCounter()
public akka.actor.Cancellable gossipTask()
public akka.actor.Cancellable failureDetectorReaperTask()
public akka.actor.Cancellable leaderActionsTask()
public scala.Option<akka.actor.Cancellable> publishStatsTask()
public void preStart()
preStart
in interface akka.actor.Actor
public void postStop()
postStop
in interface akka.actor.Actor
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> uninitialized()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> tryingToJoin(akka.actor.Address joinWith, scala.Option<scala.concurrent.duration.Deadline> deadline)
public void becomeUninitialized()
public void becomeInitialized()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> initialized()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> removed()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
receive
in interface akka.actor.Actor
public void unhandled(java.lang.Object message)
unhandled
in interface akka.actor.Actor
public void initJoin()
public void joinSeedNodes(scala.collection.immutable.IndexedSeq<akka.actor.Address> newSeedNodes)
public void join(akka.actor.Address address)
address
.
It's only allowed to join from an empty state, i.e. when not already a member.
A Join(selfUniqueAddress)
command is sent to the node to join,
which will reply with a Welcome
message.address
- (undocumented)public void stopSeedNodeProcess()
public void joining(UniqueAddress node, scala.collection.immutable.Set<java.lang.String> roles)
Join
message and replies with Welcome
message, containing
current gossip state, including the new joining member.node
- (undocumented)roles
- (undocumented)public void welcome(akka.actor.Address joinWith, UniqueAddress from, Gossip gossip)
joinWith
- (undocumented)from
- (undocumented)gossip
- (undocumented)public void leaving(akka.actor.Address address)
address
- (undocumented)public void shutdown()
public void downing(akka.actor.Address address)
seen
table.
The node will eventually be removed by the leader, and only after removal a new node with same address can join the cluster through the normal joining procedure.
address
- (undocumented)public void quarantined(UniqueAddress node)
public void receiveGossipStatus(GossipStatus status)
public akka.cluster.ClusterCoreDaemon.Ignored$ Ignored()
public akka.cluster.ClusterCoreDaemon.Older$ Older()
public akka.cluster.ClusterCoreDaemon.Newer$ Newer()
public akka.cluster.ClusterCoreDaemon.Same$ Same()
public akka.cluster.ClusterCoreDaemon.Merge$ Merge()
public ClusterCoreDaemon.ReceiveGossipType receiveGossip(GossipEnvelope envelope)
envelope
- (undocumented)public void gossipTick()
public void gossipSpeedupTick()
public boolean isGossipSpeedupNeeded()
public void gossip()
public double adjustedGossipDifferentViewProbability()
public void leaderActions()
public void shutdownSelfWhenDown()
public boolean isMinNrOfMembersFulfilled()
public void leaderActionsOnConvergence()
seen
table
9. Update the state with the new gossippublic void moveJoiningToWeaklyUp()
public void reapUnreachableMembers()
public scala.Option<UniqueAddress> selectRandomNode(scala.collection.IndexedSeq<UniqueAddress> nodes)
public boolean isSingletonCluster()
public void sendGossipTo(akka.actor.Address address)
public void gossipTo(UniqueAddress node)
node
- (undocumented)public void gossipTo(UniqueAddress node, akka.actor.ActorRef destination)
public void gossipStatusTo(UniqueAddress node, akka.actor.ActorRef destination)
public void gossipStatusTo(UniqueAddress node)
public boolean validNodeForGossip(UniqueAddress node)
public void updateLatestGossip(Gossip newGossip)
public void assertLatestGossip()
public void publish(Gossip newGossip)
public void publishInternalStats()