Class RemoteWatcher
INTERNAL API
Remote nodes with actors that are watched are monitored by this actor to be able to detect network failures and process crashes. Akka.Remote.RemoteActorRefProvider intercepts Watch and Unwatch system messages and sends corresponding RemoteWatcher.WatchRemote and RemoteWatcher.UnwatchRemote to this actor.
For a new node to be watched this actor periodically sends RemoteWatcher.Heartbeat to the peer actor on the other node, which replies with RemoteWatcher.HeartbeatRsp message back. The failure detector on the watching side monitors these heartbeat messages. If arrival of heartbeat messages stops it will be detected and this actor will publish Akka.Actor.AddressTerminated to the Akka.Event.AddressTerminatedTopic.
When all actors on a node have been unwatched it will stop sending heartbeat messages.
For bi-directional watch between two nodes the same thing will be established in both directions, but independent of each other.
Inherited Members
Namespace: Akka.Remote
Assembly: Akka.Remote.dll
Syntax
public class RemoteWatcher : UntypedActor, IInternalActor, IRequiresMessageQueue<IUnboundedMessageQueueSemantics>
Constructors
| Improve this Doc View SourceRemoteWatcher(IFailureDetectorRegistry<Address>, TimeSpan, TimeSpan, TimeSpan)
TBD
Declaration
public RemoteWatcher(IFailureDetectorRegistry<Address> failureDetector, TimeSpan heartbeatInterval, TimeSpan unreachableReaperInterval, TimeSpan heartbeatExpectedResponseAfter)
Parameters
Type | Name | Description |
---|---|---|
IFailureDetectorRegistry<Address> | failureDetector | TBD |
TimeSpan | heartbeatInterval | TBD |
TimeSpan | unreachableReaperInterval | TBD |
TimeSpan | heartbeatExpectedResponseAfter | TBD |
Exceptions
Type | Condition |
---|---|
ConfigurationException | This exception is thrown when the actor system does not have a Akka.Remote.RemoteActorRefProvider enabled in the configuration. |
Fields
| Improve this Doc View SourceLog
Declaration
protected readonly ILoggingAdapter Log
Field Value
Type | Description |
---|---|
ILoggingAdapter |
WatcheeByNodes
Nodes that this node is watching, i.e. expecting heartbeats from these nodes. Map of address --> Set(watchee) on this address.
Declaration
protected readonly Dictionary<Address, HashSet<IInternalActorRef>> WatcheeByNodes
Field Value
Type | Description |
---|---|
Dictionary<Address, HashSet<Akka.Actor.IInternalActorRef>> |
Watching
Actors that this node is watching, map of watchee --> Set(watchers)
Declaration
protected readonly Dictionary<IInternalActorRef, HashSet<IInternalActorRef>> Watching
Field Value
Type | Description |
---|---|
Dictionary<Akka.Actor.IInternalActorRef, HashSet<Akka.Actor.IInternalActorRef>> |
Properties
| Improve this Doc View SourceUnreachable
TBD
Declaration
protected HashSet<Address> Unreachable { get; }
Property Value
Type | Description |
---|---|
HashSet<Address> |
WatchingNodes
TBD
Declaration
protected ICollection<Address> WatchingNodes { get; }
Property Value
Type | Description |
---|---|
ICollection<Address> |
Methods
| Improve this Doc View SourceAddWatching(IInternalActorRef, IInternalActorRef)
TBD
Declaration
protected void AddWatching(IInternalActorRef watchee, IInternalActorRef watcher)
Parameters
Type | Name | Description |
---|---|---|
Akka.Actor.IInternalActorRef | watchee | TBD |
Akka.Actor.IInternalActorRef | watcher | TBD |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | TBD |
OnReceive(Object)
TBD
Declaration
protected override void OnReceive(object message)
Parameters
Type | Name | Description |
---|---|---|
Object | message | TBD |
Overrides
| Improve this Doc View SourcePostStop()
TBD
Declaration
protected override void PostStop()
Overrides
| Improve this Doc View SourceProps(IFailureDetectorRegistry<Address>, TimeSpan, TimeSpan, TimeSpan)
TBD
Declaration
public static Props Props(IFailureDetectorRegistry<Address> failureDetector, TimeSpan heartbeatInterval, TimeSpan unreachableReaperInterval, TimeSpan heartbeatExpectedResponseAfter)
Parameters
Type | Name | Description |
---|---|---|
IFailureDetectorRegistry<Address> | failureDetector | TBD |
TimeSpan | heartbeatInterval | TBD |
TimeSpan | unreachableReaperInterval | TBD |
TimeSpan | heartbeatExpectedResponseAfter | TBD |
Returns
Type | Description |
---|---|
Props | TBD |
PublishAddressTerminated(Address)
TBD
Declaration
protected virtual void PublishAddressTerminated(Address address)
Parameters
Type | Name | Description |
---|---|---|
Address | address | TBD |
Quarantine(Address, Nullable<Int32>)
TBD
Declaration
protected virtual void Quarantine(Address address, int? addressUid)
Parameters
Type | Name | Description |
---|---|---|
Address | address | TBD |
Nullable<Int32> | addressUid | TBD |
RemoveWatch(IInternalActorRef, IInternalActorRef)
TBD
Declaration
protected void RemoveWatch(IInternalActorRef watchee, IInternalActorRef watcher)
Parameters
Type | Name | Description |
---|---|---|
Akka.Actor.IInternalActorRef | watchee | TBD |
Akka.Actor.IInternalActorRef | watcher | TBD |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | TBD |
RemoveWatchee(IInternalActorRef)
TBD
Declaration
protected void RemoveWatchee(IInternalActorRef watchee)
Parameters
Type | Name | Description |
---|---|---|
Akka.Actor.IInternalActorRef | watchee | TBD |
UnwatchNode(Address)
TBD
Declaration
protected void UnwatchNode(Address watcheeAddress)
Parameters
Type | Name | Description |
---|---|---|
Address | watcheeAddress | TBD |
WatchNode(IInternalActorRef)
TBD
Declaration
protected virtual void WatchNode(IInternalActorRef watchee)
Parameters
Type | Name | Description |
---|---|---|
Akka.Actor.IInternalActorRef | watchee | TBD |