Package akka.cluster

Class ClusterRemoteWatcher

  • All Implemented Interfaces:
    Actor, ActorLogging, RequiresMessageQueue<UnboundedMessageQueueSemantics>

    public class ClusterRemoteWatcher
    extends RemoteWatcher
    INTERNAL API

    Specialization of RemoteWatcher that keeps track of cluster member nodes and is responsible for watchees on cluster nodes. AddressTerminated is published when node is removed from cluster.

    RemoteWatcher handles non-cluster nodes. ClusterRemoteWatcher will take over responsibility from RemoteWatcher if a watch is added before a node is member of the cluster and then later becomes cluster member.

    • Constructor Detail

      • ClusterRemoteWatcher

        public ClusterRemoteWatcher​(FailureDetectorRegistry<Address> failureDetector,
                                    scala.concurrent.duration.FiniteDuration heartbeatInterval,
                                    scala.concurrent.duration.FiniteDuration unreachableReaperInterval,
                                    scala.concurrent.duration.FiniteDuration heartbeatExpectedResponseAfter)
    • Method Detail

      • props

        public static Props props​(FailureDetectorRegistry<Address> failureDetector,
                                  scala.concurrent.duration.FiniteDuration heartbeatInterval,
                                  scala.concurrent.duration.FiniteDuration unreachableReaperInterval,
                                  scala.concurrent.duration.FiniteDuration heartbeatExpectedResponseAfter)
        Factory method for ClusterRemoteWatcher Props.
        Parameters:
        failureDetector - (undocumented)
        heartbeatInterval - (undocumented)
        unreachableReaperInterval - (undocumented)
        heartbeatExpectedResponseAfter - (undocumented)
        Returns:
        (undocumented)
      • sender

        public static final ActorRef sender()
      • aroundReceive

        protected static void aroundReceive​(scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receive,
                                            java.lang.Object msg)
      • aroundPreStart

        protected static void aroundPreStart()
      • aroundPostStop

        protected static void aroundPostStop()
      • aroundPreRestart

        protected static void aroundPreRestart​(java.lang.Throwable reason,
                                               scala.Option<java.lang.Object> message)
      • aroundPostRestart

        protected static void aroundPostRestart​(java.lang.Throwable reason)
      • preRestart

        public static void preRestart​(java.lang.Throwable reason,
                                      scala.Option<java.lang.Object> message)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • postRestart

        public static void postRestart​(java.lang.Throwable reason)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unhandled

        public static void unhandled​(java.lang.Object message)
      • scheduler

        public static Scheduler scheduler()
      • artery

        public static boolean artery()
      • watcheeByNodes

        public static scala.collection.mutable.HashMap<Address,​scala.collection.mutable.Set<InternalActorRef>> watcheeByNodes()
      • watchingNodes

        public static scala.collection.Set<Address> watchingNodes()
      • unreachable

        public static scala.collection.immutable.Set<Address> unreachable()
      • unreachable_$eq

        public static void unreachable_$eq​(scala.collection.immutable.Set<Address> x$1)
      • addressUids

        public static scala.collection.immutable.Map<Address,​java.lang.Object> addressUids()
      • addressUids_$eq

        public static void addressUids_$eq​(scala.collection.immutable.Map<Address,​java.lang.Object> x$1)
      • heartbeatTask

        public static Cancellable heartbeatTask()
      • failureDetectorReaperTask

        public static Cancellable failureDetectorReaperTask()
      • receiveHeartbeat

        public static void receiveHeartbeat()
      • receiveHeartbeatRsp

        public static void receiveHeartbeatRsp​(long uid)
      • reapUnreachable

        public static void reapUnreachable()
      • publishAddressTerminated

        public static void publishAddressTerminated​(Address address)
      • quarantine

        public static void quarantine​(Address address,
                                      scala.Option<java.lang.Object> uid,
                                      java.lang.String reason,
                                      boolean harmless)
      • removeWatchee

        public static void removeWatchee​(InternalActorRef watchee)
      • unwatchNode

        public static void unwatchNode​(Address watcheeAddress)
      • terminated

        public static void terminated​(InternalActorRef watchee,
                                      boolean existenceConfirmed,
                                      boolean addressTerminated)
      • sendHeartbeat

        public static void sendHeartbeat()
      • triggerFirstHeartbeat

        public static void triggerFirstHeartbeat​(Address address)
      • reWatch

        public static void reWatch​(Address address)
      • akka$actor$ActorLogging$$_log

        public static LoggingAdapter akka$actor$ActorLogging$$_log()
      • akka$actor$ActorLogging$$_log_$eq

        public static void akka$actor$ActorLogging$$_log_$eq​(LoggingAdapter x$1)
      • self

        public static final ActorRef self()
      • akka$actor$Actor$_setter_$context_$eq

        protected static void akka$actor$Actor$_setter_$context_$eq​(ActorContext x$1)
      • akka$actor$Actor$_setter_$self_$eq

        protected static final void akka$actor$Actor$_setter_$self_$eq​(ActorRef x$1)
      • cluster

        public Cluster cluster()
      • clusterNodes

        public scala.collection.immutable.Set<Address> clusterNodes()
      • clusterNodes_$eq

        public void clusterNodes_$eq​(scala.collection.immutable.Set<Address> x$1)
      • 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
        Overrides:
        postStop in class RemoteWatcher
      • 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
        Overrides:
        receive in class RemoteWatcher
        Returns:
        (undocumented)
      • receiveClusterEvent

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

        public void memberUp​(Member m)
      • quarantineOldIncarnation

        public void quarantineOldIncarnation​(Member newIncarnation)
      • delayedQuarantine

        public void delayedQuarantine​(Member m,
                                      MemberStatus previousStatus)
      • takeOverResponsibility

        public void takeOverResponsibility​(Address address)
        When a cluster node is added this class takes over the responsibility for watchees on that node already handled by super RemoteWatcher.
        Parameters:
        address - (undocumented)