public class ActorCell extends java.lang.Object implements UntypedActorContext, AbstractActorContext, Cell, ReceiveTimeout, Children, Dispatch, DeathWatch, FaultHandling
Constructor and Description |
---|
ActorCell(ActorSystemImpl system,
InternalActorRef self,
Props props,
MessageDispatcher dispatcher,
InternalActorRef parent) |
Modifier and Type | Method and Description |
---|---|
Actor |
actor() |
static ActorRef |
actorFor(ActorPath path) |
static ActorRef |
actorFor(scala.collection.Iterable<java.lang.String> path) |
static ActorRef |
actorFor(java.lang.Iterable<java.lang.String> path) |
static ActorRef |
actorFor(java.lang.String path) |
abstract static ActorRef |
actorOf(Props props) |
abstract static ActorRef |
actorOf(Props props,
java.lang.String name) |
static ActorSelection |
actorSelection(ActorPath path) |
static ActorSelection |
actorSelection(java.lang.String path) |
static FunctionRef |
addFunctionRef(scala.Function2<ActorRef,java.lang.Object,scala.runtime.BoxedUnit> f) |
protected static void |
addressTerminated(Address address) |
protected static void |
addWatcher(ActorRef watchee,
ActorRef watcher) |
static void |
akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly_$eq(ChildrenContainer x$1) |
static ChildrenContainer |
akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly() |
static void |
akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly_$eq(scala.collection.immutable.Map<java.lang.String,FunctionRef> x$1) |
static scala.collection.immutable.Map<java.lang.String,FunctionRef> |
akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly() |
static void |
akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly_$eq(long x$1) |
static long |
akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly() |
static void |
akka$actor$dungeon$DeathWatch$$terminatedQueued_$eq(scala.collection.immutable.Set<ActorRef> x$1) |
static scala.collection.immutable.Set<ActorRef> |
akka$actor$dungeon$DeathWatch$$terminatedQueued() |
static void |
akka$actor$dungeon$DeathWatch$$watchedBy_$eq(scala.collection.immutable.Set<ActorRef> x$1) |
static scala.collection.immutable.Set<ActorRef> |
akka$actor$dungeon$DeathWatch$$watchedBy() |
static void |
akka$actor$dungeon$DeathWatch$$watching_$eq(scala.collection.immutable.Set<ActorRef> x$1) |
static scala.collection.immutable.Set<ActorRef> |
akka$actor$dungeon$DeathWatch$$watching() |
static void |
akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly_$eq(Mailbox x$1) |
static Mailbox |
akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly() |
static void |
akka$actor$dungeon$FaultHandling$$_failed_$eq(ActorRef x$1) |
static ActorRef |
akka$actor$dungeon$FaultHandling$$_failed() |
static void |
akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData_$eq(scala.Tuple2<scala.concurrent.duration.Duration,Cancellable> x$1) |
static scala.Tuple2<scala.concurrent.duration.Duration,Cancellable> |
akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData() |
static ActorRef |
attachChild(Props props,
boolean systemService) |
static ActorRef |
attachChild(Props props,
java.lang.String name,
boolean systemService) |
void |
autoReceiveMessage(Envelope msg) |
void |
become(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> behavior,
boolean discardOld)
Changes the Actor's behavior to become the new 'Receive' (PartialFunction[Any, Unit]) handler.
|
void |
become(Procedure<java.lang.Object> behavior)
Changes the Actor's behavior to become the new 'Procedure' handler.
|
void |
become(Procedure<java.lang.Object> behavior,
boolean discardOld)
Changes the Actor's behavior to become the new 'Procedure' handler.
|
static void |
cancelReceiveTimeout() |
static void |
checkReceiveTimeout() |
abstract static scala.Option<ActorRef> |
child(java.lang.String name) |
abstract static scala.collection.immutable.Iterable<ActorRef> |
children() |
abstract static ChildrenContainer |
childrenRefs() |
protected java.lang.Class<?> |
clazz(java.lang.Object o) |
protected void |
clearActorCellFields(ActorCell cell) |
protected void |
clearActorFields(Actor actorInstance,
boolean recreate) |
static java.lang.ThreadLocal<scala.collection.immutable.List<ActorContext>> |
contextStack() |
protected void |
create(scala.Option<ActorInitializationException> failure) |
Envelope |
currentMessage() |
static int |
DefaultState() |
MessageDispatcher |
dispatcher()
Returns the dispatcher (MessageDispatcher) that is used for this Actor.
|
static scala.collection.immutable.Set<ActorRef> |
emptyActorRefSet() |
static scala.collection.immutable.List<scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>> |
emptyBehaviorStack() |
static Cancellable |
emptyCancellable() |
protected static void |
faultCreate() |
protected static void |
faultRecreate(java.lang.Throwable cause) |
protected static void |
faultResume(java.lang.Throwable causedByFailure) |
protected static void |
faultSuspend() |
protected static scala.collection.immutable.Iterable<ChildRestartStats> |
getAllChildStats() |
abstract static ActorRef |
getChild(java.lang.String name) |
abstract static scala.Option<ChildStats> |
getChildByName(java.lang.String name) |
protected static scala.Option<ChildRestartStats> |
getChildByRef(ActorRef ref) |
abstract static java.lang.Iterable<ActorRef> |
getChildren() |
static InternalActorRef |
getFunctionRefOrNobody(java.lang.String name,
int uid) |
static int |
getFunctionRefOrNobody$default$2() |
abstract static InternalActorRef |
getSingleChild(java.lang.String name) |
protected InternalActorRef |
guardian()
Father of all children created by this interface.
|
protected static void |
handleChildTerminated(ActorRef child) |
protected static void |
handleFailure(Failed f) |
static void |
handleInvokeFailure(scala.collection.immutable.Iterable<ActorRef> childrenNotToSuspend,
java.lang.Throwable t) |
protected static scala.PartialFunction<java.lang.Throwable,scala.runtime.BoxedUnit> |
handleNonFatalOrInterruptedException(scala.Function1<java.lang.Throwable,scala.runtime.BoxedUnit> thunk) |
protected void |
handleSupervise(ActorRef child,
boolean async) |
abstract static boolean |
hasMessages() |
static Dispatch |
init(boolean sendSupervise,
MailboxType mailboxType) |
static scala.Option<ChildRestartStats> |
initChild(ActorRef ref) |
static Dispatch |
initWithFailure(java.lang.Throwable failure) |
void |
invoke(Envelope messageHandle) |
boolean |
isLocal()
Returns true if the actor is local, i.e.
|
protected static boolean |
isNormal() |
abstract static boolean |
isTerminated() |
protected static boolean |
isTerminating() |
static boolean |
isWatching(ActorRef ref) |
protected InternalActorRef |
lookupRoot()
INTERNAL API
|
static Mailbox |
mailbox() |
protected Actor |
newActor() |
static int |
newUid() |
abstract static int |
numberOfMessages() |
InternalActorRef |
parent()
Returns the supervising parent ActorRef.
|
Props |
props()
Retrieve the Props which were used to create this actor.
|
ActorRefProvider |
provider()
INTERNAL API
|
protected void |
publish(Logging.LogEvent e) |
protected static java.lang.String |
randomName() |
protected static java.lang.String |
randomName(java.lang.StringBuilder sb) |
protected static void |
receivedTerminated(Terminated t) |
void |
receiveMessage(java.lang.Object msg) |
abstract static scala.concurrent.duration.Duration |
receiveTimeout() |
protected static scala.Option<ChildrenContainer.SuspendReason> |
removeChildAndGetStateChange(ActorRef child) |
static boolean |
removeFunctionRef(FunctionRef ref) |
protected static void |
remWatcher(ActorRef watchee,
ActorRef watcher) |
static boolean |
reserveChild(java.lang.String name) |
abstract static void |
restart(java.lang.Throwable cause) |
abstract static void |
resume(java.lang.Throwable causedByFailure) |
protected static void |
resumeChildren(java.lang.Throwable causedByFailure,
ActorRef perp) |
InternalActorRef |
self()
The “self” reference which this Cell is attached to.
|
ActorRef |
sender()
Returns the sender 'ActorRef' of the current message.
|
abstract static void |
sendMessage(Envelope msg) |
static void |
sendMessage(java.lang.Object message,
ActorRef sender) |
abstract static void |
sendSystemMessage(SystemMessage msg) |
protected void |
setActorFields(Actor actorInstance,
ActorContext context,
ActorRef self) |
protected static boolean |
setChildrenTerminationReason(ChildrenContainer.SuspendReason reason) |
abstract static void |
setReceiveTimeout(scala.concurrent.duration.Duration timeout) |
protected static void |
setTerminated() |
static scala.Tuple2<java.lang.String,java.lang.Object> |
splitNameAndUid(java.lang.String name) |
abstract static Cell |
start() |
protected void |
stash(SystemMessage msg) |
abstract static void |
stop() |
abstract static void |
stop(ActorRef actor) |
protected static void |
stopFunctionRefs() |
abstract static void |
suspend() |
protected static void |
suspendChildren(scala.collection.immutable.Set<ActorRef> exceptFor) |
protected static scala.collection.immutable.Set<ActorRef> |
suspendChildren$default$1() |
static int |
SuspendedState() |
static int |
SuspendedWaitForChildrenState() |
static Mailbox |
swapMailbox(Mailbox newMailbox) |
ActorSystemImpl |
system()
The system that the actor belongs to.
|
ActorSystemImpl |
systemImpl()
INTERNAL API
|
void |
systemInvoke(SystemMessage message) |
protected static void |
tellWatchersWeDied() |
protected static void |
terminate() |
static Props |
terminatedProps() |
static void |
terminatedQueuedFor(ActorRef subject) |
protected int |
uid() |
void |
unbecome()
Reverts the Actor behavior to the previous one on the behavior stack.
|
static int |
undefinedUid() |
protected static boolean |
unreserveChild(java.lang.String name) |
abstract static ActorRef |
unwatch(ActorRef subject) |
protected static void |
unwatchWatchedActors(Actor actor) |
protected static ChildrenContainer.SuspendReason |
waitingForChildrenOrNull() |
abstract static ActorRef |
watch(ActorRef subject) |
protected static void |
watchedActorTerminated(ActorRef actor,
boolean existenceConfirmed,
boolean addressTerminated) |
protected static void |
writeObject(java.io.ObjectOutputStream o) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChild, getChildren
getChild, getChildren
become, child, children, receiveTimeout, setReceiveTimeout, unwatch, watch, writeObject
actorFor, actorFor, actorFor, actorFor, actorOf, actorOf, actorSelection, actorSelection, stop
childrenRefs, getChildByName, getSingleChild, hasMessages, isTerminated, numberOfMessages, restart, resume, sendMessage, sendMessage, sendSystemMessage, start, stop, suspend
cancelReceiveTimeout, checkReceiveTimeout, receiveTimeout, setReceiveTimeout
actorOf, actorOf, addFunctionRef, attachChild, attachChild, checkName, child, children, childrenRefs, functionRefs, getAllChildStats, getChild, getChildByName, getChildByRef, getChildren, getFunctionRefOrNobody, getSingleChild, initChild, isNormal, isTerminating, makeChild, randomName, randomName, removeChildAndGetStateChange, removeFunctionRef, reserveChild, resumeChildren, setChildrenTerminationReason, setTerminated, stop, stopFunctionRefs, suspendChildren, swapChildrenRefs, unreserveChild, waitingForChildrenOrNull
handleException, hasMessages, init, initWithFailure, isTerminated, mailbox, numberOfMessages, restart, resume, sendMessage, sendSystemMessage, start, stop, suspend, swapMailbox
addressTerminated, addWatcher, isWatching, maintainAddressTerminatedSubscription, receivedTerminated, removeFromSet, remWatcher, subscribeAddressTerminated, tellWatchersWeDied, terminatedQueuedFor, unsubscribeAddressTerminated, unwatch, unwatchWatchedActors, watch, watchedActorTerminated, watchingContains
clearFailed, faultCreate, faultRecreate, faultResume, faultSuspend, finishCreate, finishRecreate, finishTerminate, handleChildTerminated, handleFailure, handleInvokeFailure, handleNonFatalOrInterruptedException, isFailed, perpetrator, resumeNonRecursive, setFailed, suspendNonRecursive, terminate
public ActorCell(ActorSystemImpl system, InternalActorRef self, Props props, MessageDispatcher dispatcher, InternalActorRef parent)
public static java.lang.ThreadLocal<scala.collection.immutable.List<ActorContext>> contextStack()
public static final Cancellable emptyCancellable()
public static final scala.collection.immutable.List<scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>> emptyBehaviorStack()
public static final scala.collection.immutable.Set<ActorRef> emptyActorRefSet()
public static final Props terminatedProps()
public static final int undefinedUid()
public static final int newUid()
public static final scala.Tuple2<java.lang.String,java.lang.Object> splitNameAndUid(java.lang.String name)
public static final int DefaultState()
public static final int SuspendedState()
public static final int SuspendedWaitForChildrenState()
public static ActorRef actorFor(java.lang.String path)
public static ActorRef actorFor(scala.collection.Iterable<java.lang.String> path)
public static ActorRef actorFor(java.lang.Iterable<java.lang.String> path)
public static ActorSelection actorSelection(java.lang.String path)
public static ActorSelection actorSelection(ActorPath path)
public abstract static void stop(ActorRef actor)
public abstract static scala.concurrent.duration.Duration receiveTimeout()
public abstract static void setReceiveTimeout(scala.concurrent.duration.Duration timeout)
public abstract static scala.collection.immutable.Iterable<ActorRef> children()
public abstract static scala.Option<ActorRef> child(java.lang.String name)
protected static final void writeObject(java.io.ObjectOutputStream o)
public abstract static java.lang.Iterable<ActorRef> getChildren()
public abstract static ActorRef getChild(java.lang.String name)
public abstract static Cell start()
public abstract static void suspend()
public abstract static void resume(java.lang.Throwable causedByFailure)
public abstract static void restart(java.lang.Throwable cause)
public abstract static void stop()
public abstract static boolean isTerminated()
public abstract static ChildrenContainer childrenRefs()
public abstract static scala.Option<ChildStats> getChildByName(java.lang.String name)
public abstract static InternalActorRef getSingleChild(java.lang.String name)
public abstract static void sendMessage(Envelope msg)
public static final void sendMessage(java.lang.Object message, ActorRef sender)
public abstract static void sendSystemMessage(SystemMessage msg)
public abstract static boolean hasMessages()
public abstract static int numberOfMessages()
public static scala.Tuple2<scala.concurrent.duration.Duration,Cancellable> akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData()
public static void akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData_$eq(scala.Tuple2<scala.concurrent.duration.Duration,Cancellable> x$1)
public static final void checkReceiveTimeout()
public static final void cancelReceiveTimeout()
public static ChildrenContainer akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly()
public static void akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly_$eq(ChildrenContainer x$1)
public static ActorRef attachChild(Props props, java.lang.String name, boolean systemService)
public static scala.collection.immutable.Map<java.lang.String,FunctionRef> akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly()
public static void akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly_$eq(scala.collection.immutable.Map<java.lang.String,FunctionRef> x$1)
public static InternalActorRef getFunctionRefOrNobody(java.lang.String name, int uid)
public static FunctionRef addFunctionRef(scala.Function2<ActorRef,java.lang.Object,scala.runtime.BoxedUnit> f)
public static boolean removeFunctionRef(FunctionRef ref)
protected static void stopFunctionRefs()
public static long akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly()
public static void akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly_$eq(long x$1)
protected static final java.lang.String randomName(java.lang.StringBuilder sb)
protected static final java.lang.String randomName()
public static final boolean reserveChild(java.lang.String name)
protected static final boolean unreserveChild(java.lang.String name)
public static final scala.Option<ChildRestartStats> initChild(ActorRef ref)
protected static final boolean setChildrenTerminationReason(ChildrenContainer.SuspendReason reason)
protected static final void setTerminated()
protected static boolean isNormal()
protected static boolean isTerminating()
protected static ChildrenContainer.SuspendReason waitingForChildrenOrNull()
protected static void suspendChildren(scala.collection.immutable.Set<ActorRef> exceptFor)
protected static void resumeChildren(java.lang.Throwable causedByFailure, ActorRef perp)
protected static scala.Option<ChildRestartStats> getChildByRef(ActorRef ref)
protected static scala.collection.immutable.Iterable<ChildRestartStats> getAllChildStats()
protected static scala.Option<ChildrenContainer.SuspendReason> removeChildAndGetStateChange(ActorRef child)
public static int getFunctionRefOrNobody$default$2()
protected static scala.collection.immutable.Set<ActorRef> suspendChildren$default$1()
public static Mailbox akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly()
public static void akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly_$eq(Mailbox x$1)
public static final Mailbox mailbox()
public static final Dispatch init(boolean sendSupervise, MailboxType mailboxType)
public static final Dispatch initWithFailure(java.lang.Throwable failure)
public static scala.collection.immutable.Set<ActorRef> akka$actor$dungeon$DeathWatch$$watching()
public static void akka$actor$dungeon$DeathWatch$$watching_$eq(scala.collection.immutable.Set<ActorRef> x$1)
public static scala.collection.immutable.Set<ActorRef> akka$actor$dungeon$DeathWatch$$watchedBy()
public static void akka$actor$dungeon$DeathWatch$$watchedBy_$eq(scala.collection.immutable.Set<ActorRef> x$1)
public static scala.collection.immutable.Set<ActorRef> akka$actor$dungeon$DeathWatch$$terminatedQueued()
public static void akka$actor$dungeon$DeathWatch$$terminatedQueued_$eq(scala.collection.immutable.Set<ActorRef> x$1)
public static boolean isWatching(ActorRef ref)
protected static void receivedTerminated(Terminated t)
protected static void watchedActorTerminated(ActorRef actor, boolean existenceConfirmed, boolean addressTerminated)
public static void terminatedQueuedFor(ActorRef subject)
protected static void tellWatchersWeDied()
protected static void unwatchWatchedActors(Actor actor)
protected static void addressTerminated(Address address)
public static ActorRef akka$actor$dungeon$FaultHandling$$_failed()
public static void akka$actor$dungeon$FaultHandling$$_failed_$eq(ActorRef x$1)
protected static void faultRecreate(java.lang.Throwable cause)
protected static void faultSuspend()
protected static void faultResume(java.lang.Throwable causedByFailure)
protected static void faultCreate()
protected static void terminate()
public static final void handleInvokeFailure(scala.collection.immutable.Iterable<ActorRef> childrenNotToSuspend, java.lang.Throwable t)
protected static final void handleFailure(Failed f)
protected static final void handleChildTerminated(ActorRef child)
protected static final scala.PartialFunction<java.lang.Throwable,scala.runtime.BoxedUnit> handleNonFatalOrInterruptedException(scala.Function1<java.lang.Throwable,scala.runtime.BoxedUnit> thunk)
public ActorSystemImpl system()
ActorContext
system
in interface ActorContext
system
in interface Cell
public InternalActorRef self()
Cell
self
in interface ActorContext
self
in interface Cell
public final Props props()
ActorContext
props
in interface ActorContext
props
in interface Cell
public MessageDispatcher dispatcher()
ActorContext
dispatcher
in interface ActorContext
dispatcher
in interface ActorRefFactory
public InternalActorRef parent()
ActorContext
parent
in interface ActorContext
parent
in interface Cell
public final boolean isLocal()
Cell
public final ActorSystemImpl systemImpl()
ActorRefFactory
systemImpl
in interface ActorRefFactory
systemImpl
in interface Cell
protected final InternalActorRef guardian()
ActorRefFactory
INTERNAL API
guardian
in interface ActorRefFactory
protected final InternalActorRef lookupRoot()
ActorRefFactory
lookupRoot
in interface ActorRefFactory
public final ActorRefProvider provider()
ActorRefFactory
provider
in interface ActorRefFactory
protected int uid()
public Actor actor()
public Envelope currentMessage()
protected void stash(SystemMessage msg)
public final void systemInvoke(SystemMessage message)
public final void invoke(Envelope messageHandle)
public void autoReceiveMessage(Envelope msg)
public final void receiveMessage(java.lang.Object msg)
public final ActorRef sender()
ActorContext
sender
in interface ActorContext
public void become(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> behavior, boolean discardOld)
ActorContext
- if discardOld = true
it will replace the top element (i.e. the current behavior)
- if discardOld = false
it will keep the current behavior and push the given one atop
The default of replacing the current behavior on the stack has been chosen to avoid memory
leaks in case client code is written without consulting this documentation first (i.e.
always pushing new behaviors and never issuing an unbecome()
)
become
in interface ActorContext
behavior
- (undocumented)discardOld
- (undocumented)public void become(Procedure<java.lang.Object> behavior)
UntypedActorContext
become
in interface UntypedActorContext
behavior
- (undocumented)public void become(Procedure<java.lang.Object> behavior, boolean discardOld)
UntypedActorContext
- if discardOld = true
it will replace the top element (i.e. the current behavior)
- if discardOld = false
it will keep the current behavior and push the given one atop
The default of replacing the current behavior on the stack has been chosen to avoid memory
leaks in case client code is written without consulting this documentation first (i.e.
always pushing new behaviors and never issuing an unbecome()
)
become
in interface UntypedActorContext
behavior
- (undocumented)discardOld
- (undocumented)public void unbecome()
ActorContext
unbecome
in interface ActorContext
protected Actor newActor()
protected void create(scala.Option<ActorInitializationException> failure)
protected void handleSupervise(ActorRef child, boolean async)
protected final void clearActorCellFields(ActorCell cell)
protected final void clearActorFields(Actor actorInstance, boolean recreate)
protected final void setActorFields(Actor actorInstance, ActorContext context, ActorRef self)
protected final void publish(Logging.LogEvent e)
protected final java.lang.Class<?> clazz(java.lang.Object o)