|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.actor.ActorRef akka.actor.InternalActorRef akka.actor.ActorRefWithCell akka.actor.RepointableActorRef
public class RepointableActorRef
This actor ref starts out with some dummy cell (by default just enqueuing messages into vectors protected by ReentrantLock), it must be initialize()’d before it can be sent to, and it will be activate()’d by its supervisor in response to the Supervise() message, which will replace the contained Cell with a fully functional one, transfer all messages from dummy to real queue and swap out the cell ref.
Constructor Summary | |
---|---|
RepointableActorRef(ActorSystemImpl system,
Props props,
MessageDispatcher dispatcher,
MailboxType mailboxType,
InternalActorRef supervisor,
ActorPath path)
|
Method Summary | |
---|---|
scala.collection.immutable.Iterable<ActorRef> |
children()
|
MessageDispatcher |
dispatcher()
|
InternalActorRef |
getChild(scala.collection.Iterator<java.lang.String> name)
Obtain ActorRef by possibly traversing the actor tree or looking it up at some provider-specific location. |
InternalActorRef |
getParent()
Obtain parent of this ref; used by getChild for ".." paths. |
InternalActorRef |
getSingleChild(java.lang.String name)
Method for looking up a single child beneath this actor. |
RepointableActorRef |
initialize(boolean async)
Initialize: make a dummy cell which holds just a mailbox, then tell our supervisor that we exist so that he can create the real Cell in handleSupervise(). |
boolean |
isLocal()
Scope: if this ref points to an actor which resides within the same JVM, i.e. |
boolean |
isStarted()
|
boolean |
isTerminated()
Returns “true” if the actor is locally known to be terminated, “false” if alive or uncertain. |
Cell |
lookup()
|
MailboxType |
mailboxType()
|
Cell |
newCell(UnstartedCell old)
This is called by activate() to obtain the cell which is to replace the unstarted cell. |
ActorPath |
path()
Returns the path for this actor (from this actor up to the root actor). |
RepointableActorRef |
point()
This method is supposed to be called by the supervisor in handleSupervise() to replace the UnstartedCell with the real one. |
Props |
props()
|
ActorRefProvider |
provider()
Get a reference to the actor ref provider which created this ref. |
void |
restart(java.lang.Throwable cause)
|
void |
resume(java.lang.Throwable causedByFailure)
|
void |
sendSystemMessage(SystemMessage message)
|
void |
start()
|
void |
stop()
|
InternalActorRef |
supervisor()
|
void |
suspend()
|
Cell |
swapCell(Cell next)
|
Cell |
swapLookup(Cell next)
|
ActorSystemImpl |
system()
|
Cell |
underlying()
|
protected java.lang.Object |
writeReplace()
|
Methods inherited from class akka.actor.ActorRef |
---|
compareTo, equals, forward, hashCode, noSender, tell, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RepointableActorRef(ActorSystemImpl system, Props props, MessageDispatcher dispatcher, MailboxType mailboxType, InternalActorRef supervisor, ActorPath path)
Method Detail |
---|
public ActorSystemImpl system()
public Props props()
public MessageDispatcher dispatcher()
public MailboxType mailboxType()
public InternalActorRef supervisor()
public ActorPath path()
ActorRef
path
in class ActorRef
public Cell underlying()
underlying
in class ActorRefWithCell
public Cell lookup()
public final Cell swapCell(Cell next)
public final Cell swapLookup(Cell next)
public RepointableActorRef initialize(boolean async)
Call twice on your own peril!
This is protected so that others can have different initialization.
async
- (undocumented)
public RepointableActorRef point()
underlying
field, though it is safe to send messages
at any time.
public Cell newCell(UnstartedCell old)
old
- (undocumented)
public void start()
start
in class InternalActorRef
public void suspend()
suspend
in class InternalActorRef
public void resume(java.lang.Throwable causedByFailure)
resume
in class InternalActorRef
public void stop()
stop
in class InternalActorRef
public void restart(java.lang.Throwable cause)
restart
in class InternalActorRef
public boolean isStarted()
isStarted
in interface RepointableRef
public boolean isTerminated()
InternalActorRef
isTerminated
in class InternalActorRef
public ActorRefProvider provider()
InternalActorRef
provider
in class InternalActorRef
public boolean isLocal()
InternalActorRef
isLocal
in interface ActorRefScope
isLocal
in class InternalActorRef
public InternalActorRef getParent()
InternalActorRef
getParent
in class InternalActorRef
public InternalActorRef getChild(scala.collection.Iterator<java.lang.String> name)
InternalActorRef
getChild
in class InternalActorRef
name
- (undocumented)
public InternalActorRef getSingleChild(java.lang.String name)
getSingleChild
in class ActorRefWithCell
name
- (undocumented)
public scala.collection.immutable.Iterable<ActorRef> children()
children
in class ActorRefWithCell
public void sendSystemMessage(SystemMessage message)
sendSystemMessage
in class InternalActorRef
protected java.lang.Object writeReplace()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |