|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectakka.dispatch.Mailbox
public abstract class Mailbox
Mailbox and InternalMailbox is separated in two classes because ActorCell is needed for implementation, but can't be exposed to user defined mailbox subclasses.
INTERNAL API
Constructor Summary | |
---|---|
Mailbox(MessageQueue messageQueue)
|
Method Summary | |
---|---|
protected int |
_statusDoNotCallMeDirectly()
|
protected SystemMessage |
_systemQueueDoNotCallMeDirectly()
|
ActorCell |
actor()
|
boolean |
becomeClosed()
set new primary status Closed. |
boolean |
canBeScheduledForExecution(boolean hasMessageHint,
boolean hasSystemMessageHint)
|
protected void |
cleanUp()
Overridable callback to clean up the mailbox, called when an actor is unregistered. |
static int |
Closed()
|
int |
currentStatus()
|
static boolean |
debug()
|
Envelope |
dequeue()
Try to dequeue the next message from this queue, return null failing that. |
MessageDispatcher |
dispatcher()
|
void |
enqueue(ActorRef receiver,
Envelope msg)
Try to enqueue the message to this queue, or throw an exception. |
boolean |
hasMessages()
Indicates whether this queue is non-empty. |
boolean |
isClosed()
|
boolean |
isScheduled()
|
boolean |
isSuspended()
|
MessageQueue |
messageQueue()
|
int |
numberOfMessages()
Should return the current number of messages held in this queue; may always return 0 if no other value is available efficiently. |
static int |
Open()
|
void |
processAllSystemMessages()
Will at least try to process all queued system messages: in case of failure simply drop and go on to the next, because there is nothing to restart here (failure is in ActorCell somewhere …). |
boolean |
resume()
Reduce the suspend count by one. |
void |
run()
|
static int |
Scheduled()
|
void |
setActor(ActorCell cell)
|
boolean |
setAsIdle()
Reset Scheduled status, keeping primary status as is. |
boolean |
setAsScheduled()
Set Scheduled status, keeping primary status as is. |
protected void |
setStatus(int newStatus)
|
static int |
shouldNotProcessMask()
|
boolean |
shouldProcessMessage()
|
static int |
shouldScheduleMask()
|
boolean |
suspend()
Increment the suspend count by one. |
int |
suspendCount()
|
static int |
suspendMask()
|
static int |
suspendUnit()
|
protected LatestFirstSystemMessageList |
systemQueueGet()
|
protected boolean |
systemQueuePut(LatestFirstSystemMessageList _old,
LatestFirstSystemMessageList _new)
|
protected boolean |
updateStatus(int oldStatus,
int newStatus)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.dispatch.SystemMessageQueue |
---|
hasSystemMessages, systemDrain, systemEnqueue |
Constructor Detail |
---|
public Mailbox(MessageQueue messageQueue)
Method Detail |
---|
public static final int Open()
public static final int Closed()
public static final int Scheduled()
public static final int shouldScheduleMask()
public static final int shouldNotProcessMask()
public static final int suspendMask()
public static final int suspendUnit()
public static final boolean debug()
public MessageQueue messageQueue()
public ActorCell actor()
public void setActor(ActorCell cell)
public MessageDispatcher dispatcher()
public void enqueue(ActorRef receiver, Envelope msg)
receiver
- (undocumented)msg
- (undocumented)public Envelope dequeue()
public boolean hasMessages()
public int numberOfMessages()
hasMessages
instead.
protected int _statusDoNotCallMeDirectly()
protected SystemMessage _systemQueueDoNotCallMeDirectly()
public final int currentStatus()
public final boolean shouldProcessMessage()
public final int suspendCount()
public final boolean isSuspended()
public final boolean isClosed()
public final boolean isScheduled()
protected final boolean updateStatus(int oldStatus, int newStatus)
protected final void setStatus(int newStatus)
public final boolean resume()
public final boolean suspend()
public final boolean becomeClosed()
public final boolean setAsScheduled()
public final boolean setAsIdle()
protected final LatestFirstSystemMessageList systemQueueGet()
protected final boolean systemQueuePut(LatestFirstSystemMessageList _old, LatestFirstSystemMessageList _new)
public final boolean canBeScheduledForExecution(boolean hasMessageHint, boolean hasSystemMessageHint)
public final void run()
run
in interface java.lang.Runnable
public final void processAllSystemMessages()
protected void cleanUp()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |