Class ActorSystemImpl
INTERNAL API
Inherited Members
Namespace: Akka.Actor.Internal
Assembly: Akka.dll
Syntax
public class ActorSystemImpl : ExtendedActorSystem, IActorRefFactory, IDisposable
Constructors
| Improve this Doc 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, Nullable<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. |
Nullable<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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
Akka.Actor.IInternalActorRef |
Overrides
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
Akka.Actor.IInternalActorRef |
Overrides
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
Akka.Actor.IInternalActorRef |
Overrides
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc View SourceActorOf(Props, String)
Interface IActorRefFactory
Declaration
public override IActorRef ActorOf(Props props, string name = null)
Parameters
Type | Name | Description |
---|---|---|
Props | props | The props used to create this actor. |
String | name | Optional. The name of this actor. |
Returns
Type | Description |
---|---|
IActorRef | A newly created actor that uses the specified props. |
Overrides
Exceptions
Type | Condition |
---|---|
InvalidActorNameException | Thrown if the given name is invalid or already in use |
ConfigurationException | Thrown if deployment, dispatcher or mailbox configuration is wrong |
ActorSelection(ActorPath)
Interface IActorRefFactory
Declaration
public override ActorSelection ActorSelection(ActorPath actorPath)
Parameters
Type | Name | Description |
---|---|---|
ActorPath | actorPath | The actor path used as the base of the actor selection. |
Returns
Type | Description |
---|---|
ActorSelection | An ActorSelection based on the specified |
Overrides
| Improve this Doc View SourceActorSelection(String)
Interface IActorRefFactory
Declaration
public override ActorSelection ActorSelection(string actorPath)
Parameters
Type | Name | Description |
---|---|---|
String | actorPath | The actor path used as the base of the actor selection. |
Returns
Type | Description |
---|---|
ActorSelection | An ActorSelection based on the specified |
Overrides
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
Boolean |
|
Overrides
| Improve this Doc 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 |
---|---|
Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type of the extension being queried |
Overrides
| Improve this Doc View SourcePrintTree()
Declaration
public override string PrintTree()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc 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 |
---|---|
Boolean |
|
Overrides
| Improve this Doc 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 |
---|---|
Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type of extension to retrieve |