Package akka.cluster

Class ClusterCoreDaemon

    • Method Detail

      • NumberOfGossipsBeforeShutdownWhenLeaderExits

        public static int NumberOfGossipsBeforeShutdownWhenLeaderExits()
      • MaxGossipsBeforeShuttingDownMyself

        public static int MaxGossipsBeforeShuttingDownMyself()
      • MaxTicksBeforeShuttingDownMyself

        public static int MaxTicksBeforeShuttingDownMyself()
      • context

        public ActorContext context()
        Description copied from interface: Actor
        Scala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such as 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 AbstractActor.ActorContext, which is the Java API of the actor context.

        Specified by:
        context in interface Actor
        Returns:
        (undocumented)
      • self

        public final ActorRef self()
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        self in interface Actor
        Returns:
        (undocumented)
      • akka$actor$Actor$_setter_$self_$eq

        protected final void akka$actor$Actor$_setter_$self_$eq​(ActorRef x$1)
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        akka$actor$Actor$_setter_$self_$eq in interface Actor
        Parameters:
        x$1 - (undocumented)
      • cluster

        public Cluster cluster()
      • selfDc

        public java.lang.String selfDc()
      • selfUniqueAddress

        protected UniqueAddress selfUniqueAddress()
      • vclockNode

        public java.lang.String vclockNode()
      • membershipState_$eq

        public void membershipState_$eq​(MembershipState x$1)
      • isCurrentlyLeader

        public boolean isCurrentlyLeader()
      • isCurrentlyLeader_$eq

        public void isCurrentlyLeader_$eq​(boolean x$1)
      • latestGossip

        public Gossip latestGossip()
      • statsEnabled

        public boolean statsEnabled()
      • gossipStats_$eq

        public void gossipStats_$eq​(GossipStats x$1)
      • seedNodes

        public scala.collection.immutable.IndexedSeq<Address> seedNodes()
      • seedNodes_$eq

        public void seedNodes_$eq​(scala.collection.immutable.IndexedSeq<Address> x$1)
      • seedNodeProcess

        public scala.Option<ActorRef> seedNodeProcess()
      • seedNodeProcess_$eq

        public void seedNodeProcess_$eq​(scala.Option<ActorRef> x$1)
      • seedNodeProcessCounter

        public int seedNodeProcessCounter()
      • seedNodeProcessCounter_$eq

        public void seedNodeProcessCounter_$eq​(int x$1)
      • joinSeedNodesDeadline

        public scala.Option<scala.concurrent.duration.Deadline> joinSeedNodesDeadline()
      • joinSeedNodesDeadline_$eq

        public void joinSeedNodesDeadline_$eq​(scala.Option<scala.concurrent.duration.Deadline> x$1)
      • leaderActionCounter

        public int leaderActionCounter()
      • leaderActionCounter_$eq

        public void leaderActionCounter_$eq​(int x$1)
      • selfDownCounter

        public int selfDownCounter()
      • selfDownCounter_$eq

        public void selfDownCounter_$eq​(int x$1)
      • exitingTasksInProgress

        public boolean exitingTasksInProgress()
      • exitingTasksInProgress_$eq

        public void exitingTasksInProgress_$eq​(boolean x$1)
      • selfExiting

        public scala.concurrent.Promise<Done> selfExiting()
      • exitingConfirmed

        public scala.collection.immutable.Set<UniqueAddress> exitingConfirmed()
      • exitingConfirmed_$eq

        public void exitingConfirmed_$eq​(scala.collection.immutable.Set<UniqueAddress> x$1)
      • failureDetectorReaperTask

        public Cancellable failureDetectorReaperTask()
      • leaderActionsTask

        public Cancellable leaderActionsTask()
      • publishStatsTask

        public scala.Option<Cancellable> publishStatsTask()
      • preStart

        public void preStart()
        Description copied from interface: Actor
        User overridable callback.

        Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.
        Specified by:
        preStart in interface Actor
      • postStop

        public void postStop()
        Description copied from interface: Actor
        User overridable callback.

        Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.
        Specified by:
        postStop in interface Actor
      • uninitialized

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> uninitialized()
      • tryingToJoin

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> tryingToJoin​(Address joinWith,
                                                                                                  scala.Option<scala.concurrent.duration.Deadline> deadline)
      • becomeUninitialized

        public void becomeUninitialized()
      • becomeInitialized

        public void becomeInitialized()
      • initialized

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> initialized()
      • receiveExitingCompleted

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receiveExitingCompleted()
      • receive

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receive()
        Description copied from interface: Actor
        Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
        Specified by:
        receive in interface Actor
        Returns:
        (undocumented)
      • unhandled

        public void unhandled​(java.lang.Object message)
        Description copied from interface: Actor
        User overridable callback.

        Is called when a message isn't handled by the current behavior of the actor by default it fails with either a DeathPactException (in case of an unhandled Terminated message) or publishes an UnhandledMessage to the actor's system's EventStream
        Specified by:
        unhandled in interface Actor
        Parameters:
        message - (undocumented)
      • initJoin

        public void initJoin​(com.typesafe.config.Config joiningNodeConfig)
      • joinSeedNodes

        public void joinSeedNodes​(scala.collection.immutable.IndexedSeq<Address> newSeedNodes)
      • join

        public void join​(Address address)
        Try to join this cluster node with the node specified by 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.
        Parameters:
        address - (undocumented)
      • stopSeedNodeProcess

        public void stopSeedNodeProcess()
      • joining

        public void joining​(UniqueAddress joiningNode,
                            scala.collection.immutable.Set<java.lang.String> roles)
        State transition to JOINING - new node joining. Received Join message and replies with Welcome message, containing current gossip state, including the new joining member.
        Parameters:
        joiningNode - (undocumented)
        roles - (undocumented)
      • welcome

        public void welcome​(Address joinWith,
                            UniqueAddress from,
                            Gossip gossip)
        Accept reply from Join request.
        Parameters:
        joinWith - (undocumented)
        from - (undocumented)
        gossip - (undocumented)
      • leaving

        public void leaving​(Address address)
        State transition to LEAVING. The node will eventually be removed by the leader, after hand-off in EXITING, and only after removal a new node with same address can join the cluster through the normal joining procedure.
        Parameters:
        address - (undocumented)
      • exitingCompleted

        public void exitingCompleted()
      • receiveExitingConfirmed

        public void receiveExitingConfirmed​(UniqueAddress node)
      • cleanupExitingConfirmed

        public void cleanupExitingConfirmed()
      • shutdown

        public void shutdown()
        This method is called when a member sees itself as Exiting or Down.
      • downing

        public void downing​(Address address)
        State transition to DOWN. Its status is set to DOWN. The node is also removed from the 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.

        Parameters:
        address - (undocumented)
      • receiveGossipStatus

        public void receiveGossipStatus​(GossipStatus status)
      • gossipTick

        public void gossipTick()
      • gossipSpeedupTick

        public void gossipSpeedupTick()
      • isGossipSpeedupNeeded

        public boolean isGossipSpeedupNeeded()
      • gossipRandomN

        public void gossipRandomN​(int n)
        Sends full gossip to n other random members.
        Parameters:
        n - (undocumented)
      • gossip

        public void gossip()
        Initiates a new round of gossip.
      • leaderActions

        public void leaderActions()
        Runs periodic leader actions, such as member status transitions, assigning partitions etc.
      • shutdownSelfWhenDown

        public void shutdownSelfWhenDown()
      • isMinNrOfMembersFulfilled

        public boolean isMinNrOfMembersFulfilled()
      • leaderActionsOnConvergence

        public void leaderActionsOnConvergence()
        Leader actions are as follows: 1. Move JOINING => UP -- When a node joins the cluster 2. Move LEAVING => EXITING -- 3. Non-exiting remain -- 4. Move unreachable EXITING => REMOVED -- When all nodes have seen the EXITING node as unreachable (convergence) - remove the node from the node ring and seen table 5. Move unreachable DOWN/EXITING => REMOVED -- When all nodes have seen that the node is DOWN/EXITING (convergence) - remove the node from the node ring and seen table 7. Updating the vclock version for the changes 8. Updating the seen table 9. Update the state with the new gossip
      • moveJoiningToWeaklyUp

        public void moveJoiningToWeaklyUp()
      • reapUnreachableMembers

        public void reapUnreachableMembers()
        Reaps the unreachable members according to the failure detector's verdict.
      • isSingletonCluster

        public boolean isSingletonCluster()
      • sendGossipTo

        public void sendGossipTo​(Address address)
      • gossipTo

        public void gossipTo​(UniqueAddress node)
        Gossips latest gossip to a node.
        Parameters:
        node - (undocumented)
      • gossipStatusTo

        public void gossipStatusTo​(UniqueAddress node)
      • updateLatestGossip

        public void updateLatestGossip​(Gossip gossip)
      • assertLatestGossip

        public void assertLatestGossip()
      • publishMembershipState

        public void publishMembershipState()
      • publishInternalStats

        public void publishInternalStats()