Package org.apache.pekko.actor
Interface Cell
public interface Cell
INTERNAL API
-
Method Summary
Modifier and TypeMethodDescriptionAll children of this actor, including only reserved-names.scala.Option<ChildStats>getChildByName(String name) Get the stats for the named child, if that exists.org.apache.pekko.actor.InternalActorRefgetSingleChild(String name) Method for looking up a single child beneath this actor.booleanIf the actor isLocal, returns whether "user messages" are currently queued, “false” otherwise.booleanisLocal()Returns true if the actor is local, i.e.booleanReturns “true” if the actor is locally known to be terminated, “false” if alive or uncertain.intIf the actor isLocal, returns the number of "user messages" currently queued, which may be a costly operation, 0 otherwise.org.apache.pekko.actor.InternalActorRefparent()The supervisor of this actor.props()The props for this actor cell.voidRestart this actor (will recursively restart or stop all children).voidRecursively resume this actor and all its children.self()The “self” reference which this Cell is attached to.voidsendMessage(Object message, ActorRef sender) Enqueue a message to be sent to the actor; may or may not actually schedule the actor to run, depending on which type of cell it is.voidsendMessage(Envelope msg) Enqueue a message to be sent to the actor; may or may not actually schedule the actor to run, depending on which type of cell it is.voidEnqueue a message to be sent to the actor; may or may not actually schedule the actor to run, depending on which type of cell it is.start()Start the cell: enqueued message must not be processed before this has been called.voidstop()Recursively terminate this actor and all its children.voidsuspend()Recursively suspend this actor and all its children.system()The system within which this Cell lives.org.apache.pekko.actor.ActorSystemImplThe system internals where this Cell lives.
-
Method Details
-
childrenRefs
ChildrenContainer childrenRefs()All children of this actor, including only reserved-names. -
getChildByName
Get the stats for the named child, if that exists. -
getSingleChild
Method for looking up a single child beneath this actor. It is racy if called from the outside. -
hasMessages
boolean hasMessages()If the actor isLocal, returns whether "user messages" are currently queued, “false” otherwise. -
isLocal
boolean isLocal()Returns true if the actor is local, i.e. if it is actually scheduled on a Thread in the current JVM when run. -
isTerminated
boolean isTerminated()Returns “true” if the actor is locally known to be terminated, “false” if alive or uncertain. -
numberOfMessages
int numberOfMessages()If the actor isLocal, returns the number of "user messages" currently queued, which may be a costly operation, 0 otherwise. -
parent
org.apache.pekko.actor.InternalActorRef parent()The supervisor of this actor. -
props
Props props()The props for this actor cell. -
restart
Restart this actor (will recursively restart or stop all children). Is only allowed to throw Fatal Throwables. -
resume
Recursively resume this actor and all its children. Is only allowed to throw Fatal Throwables. -
self
ActorRef self()The “self” reference which this Cell is attached to. -
sendMessage
Enqueue a message to be sent to the actor; may or may not actually schedule the actor to run, depending on which type of cell it is. Is only allowed to throw Fatal Throwables. -
sendMessage
Enqueue a message to be sent to the actor; may or may not actually schedule the actor to run, depending on which type of cell it is. Is only allowed to throw Fatal Throwables. -
sendSystemMessage
Enqueue a message to be sent to the actor; may or may not actually schedule the actor to run, depending on which type of cell it is. Is only allowed to throw Fatal Throwables. -
start
Cell start()Start the cell: enqueued message must not be processed before this has been called. The usual action is to attach the mailbox to a dispatcher. -
stop
void stop()Recursively terminate this actor and all its children. Is only allowed to throw Fatal Throwables. -
suspend
void suspend()Recursively suspend this actor and all its children. Is only allowed to throw Fatal Throwables. -
system
ActorSystem system()The system within which this Cell lives. -
systemImpl
org.apache.pekko.actor.ActorSystemImpl systemImpl()The system internals where this Cell lives.
-