public class ClusterCoreDaemon extends java.lang.Object implements Actor, ActorLogging, RequiresMessageQueue<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 |
Actor.emptyBehavior$, Actor.ignoringBehavior$
Constructor and Description |
---|
ClusterCoreDaemon(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() |
ActorContext |
context()
Stores the context for this actor, including self, and sender.
|
void |
downing(Address address)
State transition to DOWN.
|
Cancellable |
failureDetectorReaperTask() |
void |
gossip()
Initiates a new round of gossip.
|
void |
gossipRandomN(int n)
Sends full gossip to
n other random members. |
void |
gossipSpeedupTick() |
GossipStats |
gossipStats() |
void |
gossipStatusTo(UniqueAddress node) |
void |
gossipStatusTo(UniqueAddress node,
ActorRef destination) |
Cancellable |
gossipTask() |
void |
gossipTick() |
void |
gossipTo(UniqueAddress node)
Gossips latest gossip to a node.
|
void |
gossipTo(UniqueAddress node,
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(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<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.
|
Cancellable |
leaderActionsTask() |
void |
leaving(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()
User overridable callback.
|
void |
preStart()
User overridable callback.
|
void |
publish(Gossip newGossip) |
void |
publishInternalStats() |
scala.Option<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()
This defines the initial actor behavior, it must return a partial function
with the actor logic.
|
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<ActorRef> |
seedNodeProcess() |
int |
seedNodeProcessCounter() |
scala.collection.immutable.IndexedSeq<Address> |
seedNodes() |
scala.Option<UniqueAddress> |
selectRandomNode(scala.collection.IndexedSeq<UniqueAddress> nodes) |
ActorRef |
self()
The 'self' field holds the ActorRef for this actor.
|
protected UniqueAddress |
selfUniqueAddress() |
void |
sendGossipTo(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(Address joinWith,
scala.Option<scala.concurrent.duration.Deadline> deadline) |
void |
unhandled(java.lang.Object message)
User overridable callback.
|
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(Address joinWith,
UniqueAddress from,
Gossip gossip)
Reply from Join request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, preRestart, sender, supervisorStrategy
log
public ClusterCoreDaemon(ActorRef publisher)
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 ActorContext context()
Actor
forward
.
WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContext
is the Scala API. getContext
returns a
UntypedActorContext
, which is the Java API of the actor
context.
public final ActorRef self()
Actor
self ! message
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<Address> seedNodes()
public scala.Option<ActorRef> seedNodeProcess()
public int seedNodeProcessCounter()
public int leaderActionCounter()
public Cancellable gossipTask()
public Cancellable failureDetectorReaperTask()
public Cancellable leaderActionsTask()
public scala.Option<Cancellable> publishStatsTask()
public void preStart()
Actor
public void postStop()
Actor
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> uninitialized()
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> tryingToJoin(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()
Actor
public void unhandled(java.lang.Object message)
Actor
DeathPactException
(in
case of an unhandled Terminated
message) or publishes an UnhandledMessage
to the actor's system's EventStream
public void initJoin()
public void joinSeedNodes(scala.collection.immutable.IndexedSeq<Address> newSeedNodes)
public void join(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(Address joinWith, UniqueAddress from, Gossip gossip)
joinWith
- (undocumented)from
- (undocumented)gossip
- (undocumented)public void leaving(Address address)
address
- (undocumented)public void shutdown()
public void downing(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 ClusterCoreDaemon.ReceiveGossipType receiveGossip(GossipEnvelope envelope)
envelope
- (undocumented)public void gossipTick()
public void gossipSpeedupTick()
public boolean isGossipSpeedupNeeded()
public void gossipRandomN(int n)
n
other random members.n
- (undocumented)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(Address address)
public void gossipTo(UniqueAddress node)
node
- (undocumented)public void gossipTo(UniqueAddress node, ActorRef destination)
public void gossipStatusTo(UniqueAddress node, 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()