WorkerReplyRef
in package
implements
ActorRef
Read onlyYes
FinalYes
Tags
Table of Contents
Interfaces
- ActorRef
- Type-safe reference to an actor — the only handle user code holds.
Methods
- __construct() : mixed
- ask() : Future<string|int, R>
- Send a message and get a Future for the reply.
- isAlive() : bool
- Return true if the actor is still running and able to receive messages.
- path() : ActorPath
- Return the hierarchical path that uniquely identifies this actor in the system.
- tell() : void
- Send a message to the actor without waiting for a reply (fire-and-forget).
Methods
__construct()
public
__construct(string $requestId, int $replyToWorker, ActorPath $path, WorkerTransport $transport, callable(object): bool $onReply) : mixed
Parameters
- $requestId : string
- $replyToWorker : int
- $path : ActorPath
- $transport : WorkerTransport
- $onReply : callable(object): bool
ask()
Send a message and get a Future for the reply.
public
ask(object $message, Duration $timeout) : Future<string|int, R>
Parameters
- $message : object
- $timeout : Duration
Tags
Attributes
- #[NoDiscard]
- #[Override]
Return values
Future<string|int, R>isAlive()
Return true if the actor is still running and able to receive messages.
public
isAlive() : bool
Returns false once the actor has stopped or its mailbox has been closed. Messages sent to a stopped actor are forwarded to dead letters.
Attributes
- #[Override]
Return values
boolpath()
Return the hierarchical path that uniquely identifies this actor in the system.
public
path() : ActorPath
Paths have the form /user/parent/child and are stable for the lifetime of the actor. They appear in log output and are used as routing keys in the worker pool and cluster layers.
Attributes
- #[Override]
Return values
ActorPathtell()
Send a message to the actor without waiting for a reply (fire-and-forget).
public
tell(T|SystemMessage $message) : void
Parameters
- $message : T|SystemMessage
Attributes
- #[Override]