Search Results for

    Show / Hide Table of Contents

    Class ActorSystemImpl

    INTERNAL API Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.

    Inheritance
    object
    ActorSystem
    ExtendedActorSystem
    ActorSystemImpl
    Implements
    IActorRefFactory
    IDisposable
    Inherited Members
    ActorSystem.StartTime
    ActorSystem.Uptime
    ActorSystem.Create(string, Config)
    ActorSystem.Create(string, BootstrapSetup)
    ActorSystem.Create(string, ActorSystemSetup)
    ActorSystem.Create(string)
    ActorSystem.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Actor.Internal
    Assembly: Akka.dll
    Syntax
    public class ActorSystemImpl : ExtendedActorSystem, IActorRefFactory, IDisposable

    Constructors

    | Edit this page View Source

    ActorSystemImpl(string)

    Initializes a new instance of the ActorSystemImpl class.

    Declaration
    public ActorSystemImpl(string name)
    Parameters
    Type Name Description
    string name

    The name given to the actor system.

    | Edit this page View Source

    ActorSystemImpl(string, Config, ActorSystemSetup, Option<Props>?)

    Initializes a new instance of the ActorSystemImpl class.

    Declaration
    public ActorSystemImpl(string name, Config config, ActorSystemSetup setup, Option<Props>? guardianProps = null)
    Parameters
    Type Name Description
    string name

    The name given to the actor system.

    Config config

    The configuration used to configure the actor system.

    ActorSystemSetup setup

    The ActorSystemSetup used to help programmatically bootstrap the actor system.

    Option<Props>? guardianProps

    Optional - the props from the /user guardian actor.

    Exceptions
    Type Condition
    ArgumentException

    This exception is thrown if the given name is an invalid name for an actor system. Note that the name must contain only word characters (i.e. [a-zA-Z0-9] plus non-leading '-').

    ArgumentNullException

    This exception is thrown if the given config is undefined.

    Properties

    | Edit this page View Source

    ActorPipelineResolver

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override ActorProducerPipelineResolver ActorPipelineResolver { get; }
    Property Value
    Type Description
    ActorProducerPipelineResolver
    Overrides
    ExtendedActorSystem.ActorPipelineResolver
    | Edit this page View Source

    DeadLetters

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override IActorRef DeadLetters { get; }
    Property Value
    Type Description
    IActorRef
    Overrides
    ActorSystem.DeadLetters
    | Edit this page View Source

    Dispatchers

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override Dispatchers Dispatchers { get; }
    Property Value
    Type Description
    Dispatchers
    Overrides
    ActorSystem.Dispatchers
    | Edit this page View Source

    EventStream

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override EventStream EventStream { get; }
    Property Value
    Type Description
    EventStream
    Overrides
    ActorSystem.EventStream
    | Edit this page View Source

    Guardian

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override IInternalActorRef Guardian { get; }
    Property Value
    Type Description
    IInternalActorRef
    Overrides
    ExtendedActorSystem.Guardian
    | Edit this page View Source

    GuardianProps

    Declaration
    public Option<Props> GuardianProps { get; }
    Property Value
    Type Description
    Option<Props>
    | Edit this page View Source

    IgnoreRef

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override IActorRef IgnoreRef { get; }
    Property Value
    Type Description
    IActorRef
    Overrides
    ActorSystem.IgnoreRef
    | Edit this page View Source

    Log

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override ILoggingAdapter Log { get; }
    Property Value
    Type Description
    ILoggingAdapter
    Overrides
    ActorSystem.Log
    | Edit this page View Source

    LookupRoot

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override IInternalActorRef LookupRoot { get; }
    Property Value
    Type Description
    IInternalActorRef
    Overrides
    ExtendedActorSystem.LookupRoot
    | Edit this page View Source

    Mailboxes

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override Mailboxes Mailboxes { get; }
    Property Value
    Type Description
    Mailboxes
    Overrides
    ActorSystem.Mailboxes
    | Edit this page View Source

    Name

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override string Name { get; }
    Property Value
    Type Description
    string
    Overrides
    ActorSystem.Name
    | Edit this page View Source

    Provider

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override IActorRefProvider Provider { get; }
    Property Value
    Type Description
    IActorRefProvider
    Overrides
    ExtendedActorSystem.Provider
    | Edit this page View Source

    Scheduler

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override IScheduler Scheduler { get; }
    Property Value
    Type Description
    IScheduler
    Overrides
    ActorSystem.Scheduler
    | Edit this page View Source

    Serialization

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override Serialization Serialization { get; }
    Property Value
    Type Description
    Serialization
    Overrides
    ActorSystem.Serialization
    | Edit this page View Source

    Settings

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override Settings Settings { get; }
    Property Value
    Type Description
    Settings
    Overrides
    ActorSystem.Settings
    | Edit this page View Source

    SystemGuardian

    An actor system is a hierarchical group of actors which share common configuration, e.g. dispatchers, deployments, remote capabilities and addresses. It is also the entry point for creating or looking up actors. There are several possibilities for creating actors (see Props for details on props):

    system.ActorOf(props, "name");
    system.ActorOf(props);
    system.ActorOf(Props.Create(typeof(MyActor)), "name");
    system.ActorOf(Props.Create(() => new MyActor(arg1, arg2), "name");

    Where no name is given explicitly, one will be automatically generated. Important Notice: This class is not meant to be extended by user code.

    Declaration
    public override IInternalActorRef SystemGuardian { get; }
    Property Value
    Type Description
    IInternalActorRef
    Overrides
    ExtendedActorSystem.SystemGuardian
    | Edit this page View Source

    WhenTerminated

    Returns a task which will be completed after the ActorSystem has been terminated and termination hooks have been executed. Be careful to not schedule any operations on the dispatcher of this actor system as it will have been shut down before this task completes.

    Declaration
    public override Task WhenTerminated { get; }
    Property Value
    Type Description
    Task
    Overrides
    ActorSystem.WhenTerminated

    Methods

    | Edit this page View Source

    Abort()

    Shuts down the ActorSystem without all of the usual guarantees, i.e. we may not guarantee that remotely deployed actors are properly shut down when we abort.

    Declaration
    public override void Abort()
    Overrides
    ExtendedActorSystem.Abort()
    | Edit this page View Source

    ActorOf(Props, string)

    Interface IActorRefFactory

    Declaration
    public override IActorRef ActorOf(Props props, string name = null)
    Parameters
    Type Name Description
    Props props
    string name
    Returns
    Type Description
    IActorRef
    Overrides
    ActorSystem.ActorOf(Props, string)
    | Edit this page View Source

    ActorSelection(ActorPath)

    Interface IActorRefFactory

    Declaration
    public override ActorSelection ActorSelection(ActorPath actorPath)
    Parameters
    Type Name Description
    ActorPath actorPath
    Returns
    Type Description
    ActorSelection
    Overrides
    ActorSystem.ActorSelection(ActorPath)
    | Edit this page View Source

    ActorSelection(string)

    Interface IActorRefFactory

    Declaration
    public override ActorSelection ActorSelection(string actorPath)
    Parameters
    Type Name Description
    string actorPath
    Returns
    Type Description
    ActorSelection
    Overrides
    ActorSystem.ActorSelection(string)
    | Edit this page View Source

    GetExtension(IExtensionId)

    Retrieves the specified extension that is registered to this actor system.

    Declaration
    public override object GetExtension(IExtensionId extensionId)
    Parameters
    Type Name Description
    IExtensionId extensionId

    The extension to retrieve

    Returns
    Type Description
    object

    The specified extension registered to this actor system

    Overrides
    ActorSystem.GetExtension(IExtensionId)
    | Edit this page View Source

    GetExtension<T>()

    Retrieves an extension with the specified type that is registered to this actor system.

    Declaration
    public override T GetExtension<T>() where T : class, IExtension
    Returns
    Type Description
    T

    The specified extension registered to this actor system

    Type Parameters
    Name Description
    T

    The type of extension to retrieve

    Overrides
    ActorSystem.GetExtension<T>()
    | Edit this page View Source

    HasExtension(Type)

    Determines whether this actor system has an extension with the specified type.

    Declaration
    public override bool HasExtension(Type type)
    Parameters
    Type Name Description
    Type type

    The type of the extension being queried.

    Returns
    Type Description
    bool

    true if this actor system has the extension; otherwise false.

    Overrides
    ActorSystem.HasExtension(Type)
    | Edit this page View Source

    HasExtension<T>()

    Determines whether this actor system has the specified extension.

    Declaration
    public override bool HasExtension<T>() where T : class, IExtension
    Returns
    Type Description
    bool

    true if this actor system has the extension; otherwise false.

    Type Parameters
    Name Description
    T

    The type of the extension being queried

    Overrides
    ActorSystem.HasExtension<T>()
    | Edit this page View Source

    PrintTree()

    Declaration
    public override string PrintTree()
    Returns
    Type Description
    string
    Overrides
    ExtendedActorSystem.PrintTree()
    | Edit this page View Source

    RegisterExtension(IExtensionId)

    Registers the specified extension with this actor system.

    Declaration
    public override object RegisterExtension(IExtensionId extension)
    Parameters
    Type Name Description
    IExtensionId extension

    The extension to register with this actor system

    Returns
    Type Description
    object

    The extension registered with this actor system

    Overrides
    ActorSystem.RegisterExtension(IExtensionId)
    | Edit this page View Source

    RegisterOnTermination(Action)

    Registers a block of code (callback) to run after ActorSystem.shutdown has been issued and all actors in this actor system have been stopped. Multiple code blocks may be registered by calling this method multiple times.

    The callbacks will be run sequentially in reverse order of registration, i.e. last registration is run first.

    Declaration
    public override void RegisterOnTermination(Action code)
    Parameters
    Type Name Description
    Action code

    The code to run

    Overrides
    ActorSystem.RegisterOnTermination(Action)
    Exceptions
    Type Condition
    Exception

    This exception is thrown if the system has already shut down or if shutdown has been initiated.

    | Edit this page View Source

    Start()

    Starts this system

    Declaration
    public void Start()
    | Edit this page View Source

    Stop(IActorRef)

    Stops the specified actor permanently.

    Declaration
    public override void Stop(IActorRef actor)
    Parameters
    Type Name Description
    IActorRef actor

    The actor to stop

    Overrides
    ActorSystem.Stop(IActorRef)
    | Edit this page View Source

    SystemActorOf(Props, string)

    Creates a new system actor that lives under the "/system" guardian.

    Declaration
    public override IActorRef SystemActorOf(Props props, string name = null)
    Parameters
    Type Name Description
    Props props

    The Props used to create the actor.

    string name

    The name of the actor to create. The default value is null.

    Returns
    Type Description
    IActorRef

    A reference to the underlying actor.

    Overrides
    ExtendedActorSystem.SystemActorOf(Props, string)
    Exceptions
    Type Condition
    InvalidActorNameException

    This exception is thrown when the given name is invalid or already in use.

    ConfigurationException

    This exception is thrown when deployment, dispatcher or mailbox configuration is incorrect.

    | Edit this page View Source

    SystemActorOf<TActor>(string)

    Creates a new system actor that lives under the "/system" guardian.

    Declaration
    public override IActorRef SystemActorOf<TActor>(string name = null) where TActor : ActorBase, new()
    Parameters
    Type Name Description
    string name

    The name of the actor to create. The default value is null.

    Returns
    Type Description
    IActorRef

    A reference to the underlying actor.

    Type Parameters
    Name Description
    TActor

    The type of the actor to create. Must have a default constructor declared.

    Overrides
    ExtendedActorSystem.SystemActorOf<TActor>(string)
    Exceptions
    Type Condition
    InvalidActorNameException

    This exception is thrown when the given name is invalid or already in use.

    ConfigurationException

    This exception is thrown when deployment, dispatcher or mailbox configuration is incorrect.

    | Edit this page View Source

    Terminate()

    Terminates this actor system. This will stop the guardian actor, which in turn will recursively stop all its child actors, then the system guardian (below which the logging actors reside) and the execute all registered termination handlers (RegisterOnTermination(Action)).

    Be careful to not schedule any operations on completion of the returned task using the `dispatcher` of this actor system as it will have been shut down before the task completes.

    Declaration
    public override Task Terminate()
    Returns
    Type Description
    Task

    A Task that will complete once the actor system has finished terminating and all actors are stopped.

    Overrides
    ActorSystem.Terminate()
    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    | Edit this page View Source

    TryGetExtension(Type, out object)

    Tries to retrieve an extension with the specified type.

    Declaration
    public override bool TryGetExtension(Type extensionType, out object extension)
    Parameters
    Type Name Description
    Type extensionType

    The type of extension to retrieve

    object extension

    The extension that is retrieved if successful

    Returns
    Type Description
    bool

    true if the retrieval was successful; otherwise false.

    Overrides
    ActorSystem.TryGetExtension(Type, out object)
    | Edit this page View Source

    TryGetExtension<T>(out T)

    Tries to retrieve an extension with the specified type.

    Declaration
    public override bool TryGetExtension<T>(out T extension) where T : class, IExtension
    Parameters
    Type Name Description
    T extension

    The extension that is retrieved if successful

    Returns
    Type Description
    bool

    true if the retrieval was successful; otherwise false.

    Type Parameters
    Name Description
    T

    The type of extension to retrieve

    Overrides
    ActorSystem.TryGetExtension<T>(out T)

    Implements

    IActorRefFactory
    IDisposable

    Extension Methods

    ActorSystemWithExtensions.WithExtension<T>(ActorSystem)
    ActorSystemWithExtensions.WithExtension<T>(ActorSystem, Type)
    ActorSystemWithExtensions.WithExtension<T, TI>(ActorSystem)
    DistributedDataExtensions.DistributedData(ActorSystem)
    TcpExtensions.Tcp(ActorSystem)
    UdpExtensions.Udp(ActorSystem)
    PersistenceQueryExtensions.ReadJournalFor<TJournal>(ActorSystem, string)
    TcpStreamExtensions.TcpStream(ActorSystem)
    ActorRefFactoryExtensions.ActorOf<TActor>(IActorRefFactory, string)
    ActorRefFactoryExtensions.ActorSelection(IActorRefFactory, IActorRef, string)
    ActExtensions.ActorOf(IActorRefFactory, Action<IActorDsl, IActorContext>, string)
    ActExtensions.ActorOf(IActorRefFactory, Action<IActorDsl>, string)
    ActorMaterializerExtensions.Materializer(IActorRefFactory, ActorMaterializerSettings, string)
    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