An ActorSystem is home to a hierarchy of Actors. It is created using ActorSystem#apply from a Behavior object that describes the root Actor of this hierarchy and which will create all other Actors beneath it. A system also implements the ActorRef type, and sending a message to the system directs that message to the root Actor.
Not for user extension.
- Companion:
- object
- Source:
- ActorSystem.scala
Value members
Abstract methods
Obtains the external address of the default transport.
Obtains the external address of the default transport.
Consider differences in clustered and non-clustered ActorSystems. For a non-clustered ActorSystem, this will return an address without host and port. For a clustered ActorSystem, this will return the address that other nodes can use to communicate with this node.
- Source:
- ActorSystem.scala
The deadLetter address is a destination that will accept (and discard) every message sent to it.
The deadLetter address is a destination that will accept (and discard) every message sent to it.
- Source:
- ActorSystem.scala
Facilities for lookup up thread-pools from configuration.
Facilities for lookup up thread-pools from configuration.
- Source:
- ActorSystem.scala
ClassLoader wrapper which is used for reflective accesses internally. This is set to use the context class loader, if one is set, or the class loader which loaded the ActorSystem implementation. The context class loader is also set on all threads created by the ActorSystem, if one was set during creation.
ClassLoader wrapper which is used for reflective accesses internally. This is set to use the context class loader, if one is set, or the class loader which loaded the ActorSystem implementation. The context class loader is also set on all threads created by the ActorSystem, if one was set during creation.
- Source:
- ActorSystem.scala
Java API: Returns a CompletionStage which will be completed after the ActorSystem has been terminated
and termination hooks have been executed. The ActorSystem
can be stopped with ActorSystem.terminate
or by stopping the guardian actor.
Java API: Returns a CompletionStage which will be completed after the ActorSystem has been terminated
and termination hooks have been executed. The ActorSystem
can be stopped with ActorSystem.terminate
or by stopping the guardian actor.
Be careful to not schedule any operations, such as thenRunAsync
, on the dispatchers (Executor
) of this
actor system as they will have been shut down before this CompletionStage completes.
- Source:
- ActorSystem.scala
An ActorRef that ignores any incoming messages.
An ActorRef that ignores any incoming messages.
- Source:
- ActorSystem.scala
A org.slf4j.Logger that can be used to emit log messages
without specifying a more detailed source. Typically it is desirable to
use the dedicated Logger
available from each Actor’s TypedActorContext
as that ties the log entries to the actor.
A org.slf4j.Logger that can be used to emit log messages
without specifying a more detailed source. Typically it is desirable to
use the dedicated Logger
available from each Actor’s TypedActorContext
as that ties the log entries to the actor.
- Source:
- ActorSystem.scala
The name of this actor system, used to distinguish multiple ones within the same JVM & class loader.
The name of this actor system, used to distinguish multiple ones within the same JVM & class loader.
- Source:
- ActorSystem.scala
Create a string representation of the actor hierarchy within this system for debugging purposes.
Create a string representation of the actor hierarchy within this system for debugging purposes.
The format of the string is subject to change, i.e. no stable “API”.
- Source:
- ActorSystem.scala
A generic scheduler that can initiate the execution of tasks after some delay. It is recommended to use the ActorContext’s scheduling capabilities for sending messages to actors instead of registering a Runnable for execution using this facility.
A generic scheduler that can initiate the execution of tasks after some delay. It is recommended to use the ActorContext’s scheduling capabilities for sending messages to actors instead of registering a Runnable for execution using this facility.
- Source:
- ActorSystem.scala
The core settings extracted from the supplied configuration.
The core settings extracted from the supplied configuration.
- Source:
- ActorSystem.scala
Start-up time in milliseconds since the epoch.
Start-up time in milliseconds since the epoch.
- Source:
- ActorSystem.scala
Create an actor in the "/system" namespace. This actor will be shut down during system.terminate only after all user actors have terminated.
Create an actor in the "/system" namespace. This actor will be shut down during system.terminate only after all user actors have terminated.
This is only intended to be used by libraries (and Akka itself).
Applications should use ordinary spawn
.
- Source:
- ActorSystem.scala
Terminates this actor system by running akka.actor.CoordinatedShutdown with reason akka.actor.CoordinatedShutdown.ActorSystemTerminateReason.
Terminates this actor system by running akka.actor.CoordinatedShutdown with reason akka.actor.CoordinatedShutdown.ActorSystemTerminateReason.
If akka.coordinated-shutdown.run-by-actor-system-terminate
is configured to off
it will not run CoordinatedShutdown
, but the ActorSystem
and its actors
will still be terminated.
This will stop the guardian actor, which in turn will recursively stop all its child actors, and finally the system guardian (below which the logging actors reside).
This is an asynchronous operation and completion of the termination can be observed with ActorSystem.whenTerminated or ActorSystem.getWhenTerminated.
- Source:
- ActorSystem.scala
A ThreadFactory that can be used if the transport needs to create any Threads
A ThreadFactory that can be used if the transport needs to create any Threads
- Source:
- ActorSystem.scala
Up-time of this actor system in seconds.
Up-time of this actor system in seconds.
- Source:
- ActorSystem.scala
Scala API: Returns a Future which will be completed after the ActorSystem has been terminated.
The ActorSystem
can be stopped with ActorSystem.terminate
or by stopping the guardian actor.
Scala API: Returns a Future which will be completed after the ActorSystem has been terminated.
The ActorSystem
can be stopped with ActorSystem.terminate
or by stopping the guardian actor.
Be careful to not schedule any operations, such as onComplete
, on the dispatchers (ExecutionContext
)
of this actor system as they will have been shut down before this future completes.
- Source:
- ActorSystem.scala
Concrete methods
Main event bus of this actor system, used for example for logging. Accepts akka.actor.typed.eventstream.EventStream.Command.
Main event bus of this actor system, used for example for logging. Accepts akka.actor.typed.eventstream.EventStream.Command.
- Source:
- ActorSystem.scala
Return a reference to this system’s akka.actor.typed.receptionist.Receptionist.
Return a reference to this system’s akka.actor.typed.receptionist.Receptionist.
- Source:
- ActorSystem.scala
Inherited methods
Allows access to the classic akka.actor.ActorSystem
even for akka.actor.typed.ActorSystem[_]
s.
Allows access to the classic akka.actor.ActorSystem
even for akka.actor.typed.ActorSystem[_]
s.
- Inherited from:
- ClassicActorSystemProvider
- Source:
- ClassicActorSystemProvider.scala
Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered. This method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered. This method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
- Inherited from:
- Extensions
- Source:
- Extensions.scala
Returns whether the specified extension is already registered, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
Returns whether the specified extension is already registered, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
- Inherited from:
- Extensions
- Source:
- Extensions.scala
Narrow the type of this ActorRef
, which is always a safe operation.
Narrow the type of this ActorRef
, which is always a safe operation.
- Inherited from:
- ActorRef
- Source:
- ActorRef.scala
The hierarchical path name of the referenced Actor. The lifecycle of the ActorRef is fully contained within the lifecycle of the akka.actor.ActorPath and more than one Actor instance can exist with the same path at different points in time, but not concurrently.
The hierarchical path name of the referenced Actor. The lifecycle of the ActorRef is fully contained within the lifecycle of the akka.actor.ActorPath and more than one Actor instance can exist with the same path at different points in time, but not concurrently.
- Inherited from:
- ActorRef
- Source:
- ActorRef.scala
Registers the provided extension and creates its payload, if this extension isn't already registered This method has putIfAbsent-semantics, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
Registers the provided extension and creates its payload, if this extension isn't already registered This method has putIfAbsent-semantics, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
- Inherited from:
- Extensions
- Source:
- Extensions.scala
Send a message to the Actor referenced by this ActorRef using at-most-once messaging semantics.
Send a message to the Actor referenced by this ActorRef using at-most-once messaging semantics.
- Inherited from:
- ActorRef
- Source:
- ActorRef.scala
Unsafe utility method for widening the type accepted by this ActorRef;
provided to avoid having to use asInstanceOf
on the full reference type,
which would unfortunately also work on non-ActorRefs. Use it with caution,it may cause a ClassCastException when you send a message
to the widened ActorRef.
Unsafe utility method for widening the type accepted by this ActorRef;
provided to avoid having to use asInstanceOf
on the full reference type,
which would unfortunately also work on non-ActorRefs. Use it with caution,it may cause a ClassCastException when you send a message
to the widened ActorRef.
- Inherited from:
- ActorRef
- Source:
- ActorRef.scala
Implicits
Implicits
The default thread pool of this ActorSystem, configured with settings in akka.actor.default-dispatcher
.
The default thread pool of this ActorSystem, configured with settings in akka.actor.default-dispatcher
.
- Source:
- ActorSystem.scala