abstract class ActorSystem[-T] extends ActorRef[T] with Extensions with ClassicActorSystemProvider
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.
- Self Type
- ActorSystem[T] with InternalRecipientRef[T]
- Annotations
- @DoNotInherit() @ApiMayChange()
- Source
- ActorSystem.scala
- Alphabetic
- By Inheritance
- ActorSystem
- ClassicActorSystemProvider
- Extensions
- ActorRef
- Serializable
- Comparable
- RecipientRef
- AnyRef
- Any
- by ActorRefOps
- by RecipientRefOps
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ActorSystem()
Abstract Value Members
-
abstract
def
classicSystem: actor.ActorSystem
Allows access to the classic
akka.actor.ActorSystem
even forakka.actor.typed.ActorSystem[_]
s.Allows access to the classic
akka.actor.ActorSystem
even forakka.actor.typed.ActorSystem[_]
s.- Definition Classes
- ClassicActorSystemProvider
-
abstract
def
compareTo(arg0: ActorRef[_]): Int
- Definition Classes
- Comparable
-
abstract
def
deadLetters[U]: ActorRef[U]
The deadLetter address is a destination that will accept (and discard) every message sent to it.
-
abstract
def
dispatchers: Dispatchers
Facilities for lookup up thread-pools from configuration.
-
abstract
def
dynamicAccess: DynamicAccess
ClassLoader wrapper which is used for reflective accesses internally.
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.
-
implicit abstract
def
executionContext: ExecutionContextExecutor
The default thread pool of this ActorSystem, configured with settings in
akka.actor.default-dispatcher
. -
abstract
def
extension[T <: Extension](ext: ExtensionId[T]): T
Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered.
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
- Definition Classes
- Extensions
-
abstract
def
getWhenTerminated: CompletionStage[Done]
Java API: Returns a CompletionStage which will be completed after the ActorSystem has been terminated and termination hooks have been executed.
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. -
abstract
def
hasExtension(ext: ExtensionId[_ <: Extension]): Boolean
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
- Definition Classes
- Extensions
-
abstract
def
log: Logger
A akka.actor.typed.Logger that can be used to emit log messages without specifying a more detailed source.
A akka.actor.typed.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. -
abstract
def
logConfiguration(): Unit
Log the configuration.
-
abstract
def
name: String
The name of this actor system, used to distinguish multiple ones within the same JVM & class loader.
-
abstract
def
narrow[U <: T]: ActorRef[U]
Narrow the type of this
ActorRef
, which is always a safe operation.Narrow the type of this
ActorRef
, which is always a safe operation.- Definition Classes
- ActorRef
-
abstract
def
path: ActorPath
The hierarchical path name of the referenced Actor.
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.
- Definition Classes
- ActorRef
-
abstract
def
printTree: String
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”.
-
abstract
def
registerExtension[T <: Extension](ext: ExtensionId[T]): T
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
- Definition Classes
- Extensions
-
abstract
def
scheduler: Scheduler
A generic scheduler that can initiate the execution of tasks after some delay.
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.
-
abstract
def
settings: Settings
The core settings extracted from the supplied configuration.
-
abstract
def
startTime: Long
Start-up time in milliseconds since the epoch.
-
abstract
def
systemActorOf[U](behavior: Behavior[U], name: String, props: Props = Props.empty)(implicit timeout: Timeout): Future[ActorRef[U]]
Create an actor in the "/system" namespace.
-
abstract
def
tell(msg: T): Unit
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.
- Definition Classes
- ActorRef → RecipientRef
-
abstract
def
terminate(): Unit
Terminates this actor system.
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).
This is an asynchronous operation and completion of the termination can be observed with ActorSystem.whenTerminated or ActorSystem.getWhenTerminated.
-
abstract
def
threadFactory: ThreadFactory
A ThreadFactory that can be used if the transport needs to create any Threads
-
abstract
def
unsafeUpcast[U >: T]: ActorRef[U]
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.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[U].- Definition Classes
- ActorRef
-
abstract
def
uptime: Long
Up-time of this actor system in seconds.
-
abstract
def
whenTerminated: Future[Done]
Scala API: Returns a Future which will be completed after the ActorSystem has been terminated and termination hooks have been executed.
Scala API: Returns a Future 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.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to any2stringadd[ActorSystem[T]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (ActorSystem[T], B)
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to ArrowAssoc[ActorSystem[T]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
def
ensuring(cond: (ActorSystem[T]) ⇒ Boolean, msg: ⇒ Any): ActorSystem[T]
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to Ensuring[ActorSystem[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (ActorSystem[T]) ⇒ Boolean): ActorSystem[T]
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to Ensuring[ActorSystem[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): ActorSystem[T]
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to Ensuring[ActorSystem[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): ActorSystem[T]
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to Ensuring[ActorSystem[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to StringFormat[ActorSystem[T]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
receptionist: ActorRef[Command]
Return a reference to this system’s akka.actor.typed.receptionist.Receptionist.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (ActorSystem[T], B)
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to ArrowAssoc[ActorSystem[T]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Shadowed Implicit Value Members
-
def
!(msg: T): Unit
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.
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to ActorRefOps[T] performed by method ActorRefOps in akka.actor.typed.ActorRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorSystem: ActorRefOps[T]).!(msg)
- Definition Classes
- ActorRefOps
-
def
!(msg: T): Unit
Send a message to the destination referenced by this
RecipientRef
using *at-most-once* messaging semantics.Send a message to the destination referenced by this
RecipientRef
using *at-most-once* messaging semantics.- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to RecipientRefOps[T] performed by method RecipientRefOps in akka.actor.typed.RecipientRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorSystem: RecipientRefOps[T]).!(msg)
- Definition Classes
- RecipientRefOps
-
val
ref: ActorRef[T]
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to ActorRefOps[T] performed by method ActorRefOps in akka.actor.typed.ActorRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorSystem: ActorRefOps[T]).ref
- Definition Classes
- ActorRefOps
-
val
ref: RecipientRef[T]
- Implicit
- This member is added by an implicit conversion from ActorSystem[T] to RecipientRefOps[T] performed by method RecipientRefOps in akka.actor.typed.RecipientRef.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(actorSystem: RecipientRefOps[T]).ref
- Definition Classes
- RecipientRefOps