Ir al contenido
Español

ActorPath

Esta página aún no está disponible en tu idioma.

Defined in: src/ActorPath.ts:98

Hierarchical, unique path identifying an actor inside an ActorSystem. Format: actor-ts:////

new ActorPath(name, parent?, systemName?, uid?): ActorPath

Defined in: src/ActorPath.ts:99

string

ActorPath | null

string = 'default'

number = 0

ActorPath

readonly name: string

Defined in: src/ActorPath.ts:100


readonly parent: ActorPath | null = null

Defined in: src/ActorPath.ts:101


readonly systemName: string = 'default'

Defined in: src/ActorPath.ts:102


readonly uid: number = 0

Defined in: src/ActorPath.ts:103

child(name, uid?): ActorPath

Defined in: src/ActorPath.ts:113

Create a child path under this one. Inherits the constructor’s name validation, which is what makes an empty segment impossible here while still allowing one for a root.

string

number = 0

ActorPath


depth(): number

Defined in: src/ActorPath.ts:129

Full depth of the path (root has depth 0).

number


elements(): string[]

Defined in: src/ActorPath.ts:118

All path segments from root to this path (including root).

string[]


equals(other): boolean

Defined in: src/ActorPath.ts:143

ActorPath

boolean


isAncestorOf(other): boolean

Defined in: src/ActorPath.ts:134

True if this path is an ancestor of other.

ActorPath

boolean


toString(): string

Defined in: src/ActorPath.ts:158

Canonical URI form: actor-ts://system/user/foo/bar.

Memoized, because this is a hot read on an immutable value. Every field is readonly and the parent chain is fixed at construction, so the rendering cannot change once computed. It is called far more often than it looks: equals renders both sides, ref comparison goes through equals, and dead-letter routing, the receptionist and the DevTools taps all key on the string — so a deep path was re-walking its ancestors and re-joining an array on each one.

string