Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    ActorBase
    UntypedActor
    RemoteWatcher
    Implements
    IInternalActor
    IRequiresMessageQueue<IUnboundedMessageQueueSemantics>
    Inherited Members
    UntypedActor.Receive(object)
    UntypedActor.RunTask(Action)
    UntypedActor.RunTask(Func<Task>)
    UntypedActor.Become(UntypedReceive)
    UntypedActor.BecomeStacked(UntypedReceive)
    UntypedActor.Context
    ActorBase.Sender
    ActorBase.Self
    ActorBase.AroundReceive(Receive, object)
    ActorBase.EmptyReceive
    ActorBase.Unhandled(object)
    ActorBase.Become(Receive)
    ActorBase.BecomeStacked(Receive)
    ActorBase.UnbecomeStacked()
    ActorBase.SetReceiveTimeout(TimeSpan?)
    ActorBase.AroundPreRestart(Exception, object)
    ActorBase.AroundPreStart()
    ActorBase.PreStart()
    ActorBase.AroundPostRestart(Exception, object)
    ActorBase.PreRestart(Exception, object)
    ActorBase.PostRestart(Exception)
    ActorBase.AroundPostStop()
    ActorBase.SupervisorStrategy()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Remote
    Assembly: Akka.Remote.dll
    Syntax
    public class RemoteWatcher : UntypedActor, IInternalActor, IRequiresMessageQueue<IUnboundedMessageQueueSemantics>

    Constructors

    | Edit this page View Source

    RemoteWatcher(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 Source

    Log

    Declaration
    protected readonly ILoggingAdapter Log
    Field Value
    Type Description
    ILoggingAdapter
    | Edit this page View Source

    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>>
    | Edit this page View Source

    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 Source

    Unreachable

    TBD

    Declaration
    protected HashSet<Address> Unreachable { get; }
    Property Value
    Type Description
    HashSet<Address>
    | Edit this page View Source

    WatchingNodes

    TBD

    Declaration
    protected ICollection<Address> WatchingNodes { get; }
    Property Value
    Type Description
    ICollection<Address>

    Methods

    | Edit this page View Source

    AddWatching(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

    | Edit this page View Source

    OnReceive(object)

    TBD

    Declaration
    protected override void OnReceive(object message)
    Parameters
    Type Name Description
    object message

    TBD

    Overrides
    UntypedActor.OnReceive(object)
    | Edit this page View Source

    PostStop()

    TBD

    Declaration
    protected override void PostStop()
    Overrides
    ActorBase.PostStop()
    | Edit this page View Source

    Props(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

    | Edit this page View Source

    PublishAddressTerminated(Address)

    TBD

    Declaration
    protected virtual void PublishAddressTerminated(Address address)
    Parameters
    Type Name Description
    Address address

    TBD

    | Edit this page View Source

    Quarantine(Address, int?)

    TBD

    Declaration
    protected virtual void Quarantine(Address address, int? addressUid)
    Parameters
    Type Name Description
    Address address

    TBD

    int? addressUid

    TBD

    | Edit this page View Source

    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

    | Edit this page View Source

    RemoveWatchee(IInternalActorRef)

    TBD

    Declaration
    protected void RemoveWatchee(IInternalActorRef watchee)
    Parameters
    Type Name Description
    IInternalActorRef watchee

    TBD

    | Edit this page View Source

    UnwatchNode(Address)

    TBD

    Declaration
    protected void UnwatchNode(Address watcheeAddress)
    Parameters
    Type Name Description
    Address watcheeAddress

    TBD

    | Edit this page View Source

    WatchNode(IInternalActorRef)

    TBD

    Declaration
    protected virtual void WatchNode(IInternalActorRef watchee)
    Parameters
    Type Name Description
    IInternalActorRef watchee

    TBD

    Implements

    IInternalActor
    IRequiresMessageQueue<T>

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET