Class ActorSystemImpl
INTERNAL API
Inherited Members
Namespace: Akka.Actor.Internal
Assembly: Akka.dll
Syntax
public class ActorSystemImpl : ExtendedActorSystem, IActorRefFactory, IDisposable
Constructors
| Edit this page View SourceActorSystemImpl(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. |
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 |
| ArgumentNullException | This exception is thrown if the given |
Properties
| Edit this page View SourceActorPipelineResolver
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
| Edit this page View SourceDeadLetters
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
| Edit this page View SourceDispatchers
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
| Edit this page View SourceEventStream
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
| Edit this page View SourceGuardian
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
| Edit this page View SourceGuardianProps
Declaration
public Option<Props> GuardianProps { get; }
Property Value
| Type | Description |
|---|---|
| Option<Props> |
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
| Edit this page View SourceLog
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
| Edit this page View SourceLookupRoot
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
| Edit this page View SourceMailboxes
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
| Edit this page View SourceName
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
| Edit this page View SourceProvider
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
| Edit this page View SourceScheduler
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
| Edit this page View SourceSerialization
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
| Edit this page View SourceSettings
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
| Edit this page View SourceSystemGuardian
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
| Edit this page View SourceWhenTerminated
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
Methods
| Edit this page View SourceAbort()
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
| Edit this page View SourceActorOf(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
| Edit this page View SourceActorSelection(ActorPath)
Interface IActorRefFactory
Declaration
public override ActorSelection ActorSelection(ActorPath actorPath)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorPath | actorPath |
Returns
| Type | Description |
|---|---|
| ActorSelection |
Overrides
| Edit this page View SourceActorSelection(string)
Interface IActorRefFactory
Declaration
public override ActorSelection ActorSelection(string actorPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actorPath |
Returns
| Type | Description |
|---|---|
| ActorSelection |
Overrides
| Edit this page View SourceGetExtension(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
| Edit this page View SourceGetExtension<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
| Edit this page View SourceHasExtension(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 |
|
Overrides
| Edit this page View SourceHasExtension<T>()
Determines whether this actor system has the specified extension.
Declaration
public override bool HasExtension<T>() where T : class, IExtension
Returns
| Type | Description |
|---|---|
| bool |
|
Type Parameters
| Name | Description |
|---|---|
| T | The type of the extension being queried |
Overrides
| Edit this page View SourcePrintTree()
Declaration
public override string PrintTree()
Returns
| Type | Description |
|---|---|
| string |
Overrides
| Edit this page View SourceRegisterExtension(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
| Edit this page View SourceRegisterOnTermination(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
Exceptions
| Type | Condition |
|---|---|
| Exception | This exception is thrown if the system has already shut down or if shutdown has been initiated. |
Start()
Starts this system
Declaration
public void Start()
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
| Edit this page View SourceSystemActorOf(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
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. |
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
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. |
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
| Edit this page View SourceToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
| Edit this page View SourceTryGetExtension(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 |
|
Overrides
| Edit this page View SourceTryGetExtension<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 |
|
Type Parameters
| Name | Description |
|---|---|
| T | The type of extension to retrieve |
Edit this page