public class ClusterRemoteWatcher extends RemoteWatcher
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.
RemoteWatcher.ArteryHeartbeat$, RemoteWatcher.ArteryHeartbeatRsp, RemoteWatcher.ArteryHeartbeatRsp$, RemoteWatcher.ExpectedFirstHeartbeat, RemoteWatcher.ExpectedFirstHeartbeat$, RemoteWatcher.Heartbeat$, RemoteWatcher.HeartbeatRsp, RemoteWatcher.HeartbeatRsp$, RemoteWatcher.HeartbeatTick$, RemoteWatcher.ReapUnreachableTick$, RemoteWatcher.Stats, RemoteWatcher.Stats$, RemoteWatcher.UnwatchRemote, RemoteWatcher.UnwatchRemote$, RemoteWatcher.WatchRemote, RemoteWatcher.WatchRemote$
Actor.emptyBehavior$, Actor.ignoringBehavior$
Constructor and Description |
---|
ClusterRemoteWatcher(FailureDetectorRegistry<Address> failureDetector,
scala.concurrent.duration.FiniteDuration heartbeatInterval,
scala.concurrent.duration.FiniteDuration unreachableReaperInterval,
scala.concurrent.duration.FiniteDuration heartbeatExpectedResponseAfter) |
Modifier and Type | Method and Description |
---|---|
static void |
addressUids_$eq(scala.collection.immutable.Map<Address,java.lang.Object> x$1) |
static scala.collection.immutable.Map<Address,java.lang.Object> |
addressUids() |
static void |
addWatch(InternalActorRef watchee,
InternalActorRef watcher) |
protected static void |
akka$actor$Actor$_setter_$context_$eq(ActorContext x$1) |
protected static void |
akka$actor$Actor$_setter_$self_$eq(ActorRef x$1) |
static void |
akka$actor$ActorLogging$$_log_$eq(LoggingAdapter x$1) |
static LoggingAdapter |
akka$actor$ActorLogging$$_log() |
protected static void |
aroundPostRestart(java.lang.Throwable reason) |
protected static void |
aroundPostStop() |
protected static void |
aroundPreRestart(java.lang.Throwable reason,
scala.Option<java.lang.Object> message) |
protected static void |
aroundPreStart() |
protected static void |
aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive,
java.lang.Object msg) |
static boolean |
artery() |
Cluster |
cluster() |
scala.collection.immutable.Set<Address> |
clusterNodes() |
static ActorContext |
context() |
void |
delayedQuarantine(Member m,
MemberStatus previousStatus) |
static Cancellable |
failureDetectorReaperTask() |
static HeartbeatMessage |
heartBeatMsg() |
static Cancellable |
heartbeatTask() |
static LoggingAdapter |
log() |
void |
memberRemoved(Member m,
MemberStatus previousStatus) |
void |
memberUp(Member m) |
static void |
postRestart(java.lang.Throwable reason) |
void |
postStop()
User overridable callback.
|
static void |
preRestart(java.lang.Throwable reason,
scala.Option<java.lang.Object> message) |
void |
preStart()
User overridable callback.
|
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 . |
static void |
publishAddressTerminated(Address address) |
static void |
quarantine(Address address,
scala.Option<java.lang.Object> uid,
java.lang.String reason) |
static void |
reapUnreachable() |
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.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receiveClusterEvent() |
static void |
receiveHeartbeat() |
static void |
receiveHeartbeatRsp(long uid) |
static RemoteActorRefProvider |
remoteProvider() |
static void |
removeWatch(InternalActorRef watchee,
InternalActorRef watcher) |
static void |
removeWatchee(InternalActorRef watchee) |
static void |
reWatch(Address address) |
static Scheduler |
scheduler() |
static ActorRef |
self() |
static HeartbeatMessage |
selfHeartbeatRspMsg() |
static ActorRef |
sender() |
static void |
sendHeartbeat() |
static SupervisorStrategy |
supervisorStrategy() |
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.
|
static void |
terminated(InternalActorRef watchee,
boolean existenceConfirmed,
boolean addressTerminated) |
static void |
triggerFirstHeartbeat(Address address) |
static void |
unhandled(java.lang.Object message) |
static void |
unreachable_$eq(scala.collection.immutable.Set<Address> x$1) |
static scala.collection.immutable.Set<Address> |
unreachable() |
static void |
unwatchNode(Address watcheeAddress) |
static scala.collection.mutable.HashMap<Address,scala.collection.mutable.Set<InternalActorRef>> |
watcheeByNodes() |
static scala.collection.mutable.HashMap<InternalActorRef,scala.collection.mutable.Set<InternalActorRef>> |
watching() |
static scala.collection.Set<Address> |
watchingNodes() |
void |
watchNode(InternalActorRef watchee) |
addressUids, addWatch, artery, context, failureDetectorReaperTask, heartBeatMsg, heartbeatTask, publishAddressTerminated, quarantine, reapUnreachable, receiveHeartbeat, receiveHeartbeatRsp, remoteProvider, removeWatch, removeWatchee, reWatch, scheduler, self, selfHeartbeatRspMsg, sendHeartbeat, terminated, triggerFirstHeartbeat, unreachable, unwatchNode, watcheeByNodes, watching, watchingNodes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, preRestart, sender, supervisorStrategy, unhandled
log
public ClusterRemoteWatcher(FailureDetectorRegistry<Address> failureDetector, scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration unreachableReaperInterval, scala.concurrent.duration.FiniteDuration heartbeatExpectedResponseAfter)
public static Props props(FailureDetectorRegistry<Address> failureDetector, scala.concurrent.duration.FiniteDuration heartbeatInterval, scala.concurrent.duration.FiniteDuration unreachableReaperInterval, scala.concurrent.duration.FiniteDuration heartbeatExpectedResponseAfter)
ClusterRemoteWatcher
Props
.failureDetector
- (undocumented)heartbeatInterval
- (undocumented)unreachableReaperInterval
- (undocumented)heartbeatExpectedResponseAfter
- (undocumented)public static final ActorRef sender()
protected static void aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
protected static void aroundPreStart()
protected static void aroundPostStop()
protected static void aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
protected static void aroundPostRestart(java.lang.Throwable reason)
public static SupervisorStrategy supervisorStrategy()
public static void preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message) throws java.lang.Exception
java.lang.Exception
public static void postRestart(java.lang.Throwable reason) throws java.lang.Exception
java.lang.Exception
public static void unhandled(java.lang.Object message)
public static LoggingAdapter log()
public static Scheduler scheduler()
public static RemoteActorRefProvider remoteProvider()
public static boolean artery()
public static HeartbeatMessage heartBeatMsg()
public static HeartbeatMessage selfHeartbeatRspMsg()
public static scala.collection.mutable.HashMap<InternalActorRef,scala.collection.mutable.Set<InternalActorRef>> watching()
public static scala.collection.mutable.HashMap<Address,scala.collection.mutable.Set<InternalActorRef>> watcheeByNodes()
public static scala.collection.Set<Address> watchingNodes()
public static scala.collection.immutable.Set<Address> unreachable()
public static void unreachable_$eq(scala.collection.immutable.Set<Address> x$1)
public static scala.collection.immutable.Map<Address,java.lang.Object> addressUids()
public static void addressUids_$eq(scala.collection.immutable.Map<Address,java.lang.Object> x$1)
public static Cancellable heartbeatTask()
public static Cancellable failureDetectorReaperTask()
public static void receiveHeartbeat()
public static void receiveHeartbeatRsp(long uid)
public static void reapUnreachable()
public static void publishAddressTerminated(Address address)
public static void quarantine(Address address, scala.Option<java.lang.Object> uid, java.lang.String reason)
public static void addWatch(InternalActorRef watchee, InternalActorRef watcher)
public static void removeWatch(InternalActorRef watchee, InternalActorRef watcher)
public static void removeWatchee(InternalActorRef watchee)
public static void unwatchNode(Address watcheeAddress)
public static void terminated(InternalActorRef watchee, boolean existenceConfirmed, boolean addressTerminated)
public static void sendHeartbeat()
public static void triggerFirstHeartbeat(Address address)
public static void reWatch(Address address)
public static LoggingAdapter akka$actor$ActorLogging$$_log()
public static void akka$actor$ActorLogging$$_log_$eq(LoggingAdapter x$1)
public static ActorContext context()
public static final ActorRef self()
protected static void akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
protected static final void akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
public Cluster cluster()
public scala.collection.immutable.Set<Address> clusterNodes()
public void preStart()
Actor
preStart
in interface Actor
preStart
in class RemoteWatcher
public void postStop()
Actor
postStop
in interface Actor
postStop
in class RemoteWatcher
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Actor
receive
in interface Actor
receive
in class RemoteWatcher
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveClusterEvent()
public void memberUp(Member m)
public void memberRemoved(Member m, MemberStatus previousStatus)
public void delayedQuarantine(Member m, MemberStatus previousStatus)
public void watchNode(InternalActorRef watchee)
watchNode
in class RemoteWatcher
public void takeOverResponsibility(Address address)
address
- (undocumented)