trait ActorRef[-T] extends RecipientRef[T] with Comparable[ActorRef[_]] with Serializable

An ActorRef is the identity or address of an Actor instance. It is valid only during the Actor’s lifetime and allows messages to be sent to that Actor instance. Sending a message to an Actor that has terminated before receiving the message will lead to that message being discarded; such messages are delivered to the DeadLetter channel of the pekko.event.EventStream on a best effort basis (i.e. this delivery is not reliable).

Not for user extension

Self Type
ActorRef[T] with InternalRecipientRef[T]
Annotations
@DoNotInherit()
Source
ActorRef.scala
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ActorRef
  2. Serializable
  3. Comparable
  4. RecipientRef
  5. AnyRef
  6. Any
Implicitly
  1. by ActorRefOps
  2. by RecipientRefOps
  3. by any2stringadd
  4. by StringFormat
  5. by Ensuring
  6. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def compareTo(arg0: ActorRef[_]): Int
    Definition Classes
    Comparable
  2. abstract def narrow[U <: T]: ActorRef[U]

    Narrow the type of this ActorRef, which is always a safe operation.

  3. 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 pekko.actor.ActorPath and more than one Actor instance can exist with the same path at different points in time, but not concurrently.

  4. 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
    ActorRefRecipientRef
  5. 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 java.lang.ClassCastException when you send a message to the widened ActorRef[U].

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toany2stringadd[ActorRef[T]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ActorRef[T], B)
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toArrowAssoc[ActorRef[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  8. def ensuring(cond: (ActorRef[T]) => Boolean, msg: => Any): ActorRef[T]
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toEnsuring[ActorRef[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (ActorRef[T]) => Boolean): ActorRef[T]
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toEnsuring[ActorRef[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: => Any): ActorRef[T]
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toEnsuring[ActorRef[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): ActorRef[T]
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toEnsuring[ActorRef[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Shadowed Implicit Value Members

  1. 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 ActorRef[T] toActorRefOps[T] performed by method ActorRefOps in org.apache.pekko.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:
    (actorRef: ActorRefOps[T]).!(msg)
    Definition Classes
    ActorRefOps
  2. 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 ActorRef[T] toRecipientRefOps[T] performed by method RecipientRefOps in org.apache.pekko.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:
    (actorRef: RecipientRefOps[T]).!(msg)
    Definition Classes
    RecipientRefOps
  3. val ref: ActorRef[T]
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toActorRefOps[T] performed by method ActorRefOps in org.apache.pekko.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:
    (actorRef: ActorRefOps[T]).ref
    Definition Classes
    ActorRefOps
  4. val ref: RecipientRef[T]
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toRecipientRefOps[T] performed by method RecipientRefOps in org.apache.pekko.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:
    (actorRef: RecipientRefOps[T]).ref
    Definition Classes
    RecipientRefOps

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toStringFormat[ActorRef[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (ActorRef[T], B)
    Implicit
    This member is added by an implicit conversion from ActorRef[T] toArrowAssoc[ActorRef[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Serializable

Inherited from Comparable[ActorRef[_]]

Inherited from RecipientRef[T]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion ActorRefOps fromActorRef[T] to ActorRefOps[T]

Inherited by implicit conversion RecipientRefOps fromActorRef[T] to RecipientRefOps[T]

Inherited by implicit conversion any2stringadd fromActorRef[T] to any2stringadd[ActorRef[T]]

Inherited by implicit conversion StringFormat fromActorRef[T] to StringFormat[ActorRef[T]]

Inherited by implicit conversion Ensuring fromActorRef[T] to Ensuring[ActorRef[T]]

Inherited by implicit conversion ArrowAssoc fromActorRef[T] to ArrowAssoc[ActorRef[T]]

Ungrouped