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
| Edit this page 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
| Edit this page 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<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<IInternalActorRef, HashSet<IInternalActorRef>> |
Properties
| Edit this page 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
| Edit this page View SourceAddWatching(IInternalActorRef, IInternalActorRef)
TBD
Declaration
protected void AddWatching(IInternalActorRef watchee, IInternalActorRef watcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IInternalActorRef | watchee | TBD |
| 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
| Edit this page View SourcePostStop()
TBD
Declaration
protected override void PostStop()
Overrides
| Edit this page 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, int?)
TBD
Declaration
protected virtual void Quarantine(Address address, int? addressUid)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | address | TBD |
| int? | addressUid | TBD |
RemoveWatch(IInternalActorRef, IInternalActorRef)
TBD
Declaration
protected void RemoveWatch(IInternalActorRef watchee, IInternalActorRef watcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IInternalActorRef | watchee | TBD |
| IInternalActorRef | watcher | TBD |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | TBD |
RemoveWatchee(IInternalActorRef)
TBD
Declaration
protected void RemoveWatchee(IInternalActorRef watchee)
Parameters
| Type | Name | Description |
|---|---|---|
| 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 |
|---|---|---|
| IInternalActorRef | watchee | TBD |
Edit this page