public abstract class MessageDispatcher extends java.lang.Object implements BatchingExecutor, scala.concurrent.ExecutionContextExecutor
Constructor and Description |
---|
MessageDispatcher(MessageDispatcherConfigurator configurator) |
Modifier and Type | Method and Description |
---|---|
static Index<MessageDispatcher,ActorRef> |
actors() |
protected abstract static void |
akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_blockContext_$eq(java.lang.ThreadLocal<scala.concurrent.BlockContext> x$1) |
protected abstract static void |
akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_tasksLocal_$eq(java.lang.ThreadLocal<BatchingExecutor.AbstractBatch> x$1) |
static java.lang.ThreadLocal<scala.concurrent.BlockContext> |
akka$dispatch$BatchingExecutor$$_blockContext() |
static java.lang.ThreadLocal<BatchingExecutor.AbstractBatch> |
akka$dispatch$BatchingExecutor$$_tasksLocal() |
void |
attach(ActorCell actor)
Attaches the specified actor instance to this dispatcher, which includes
scheduling it to run for the first time (Create() is expected to have
been enqueued by the ActorCell upon mailbox creation).
|
static boolean |
batchable(java.lang.Runnable runnable) |
MessageDispatcherConfigurator |
configurator() |
protected abstract Mailbox |
createMailbox(Cell actor,
MailboxType mailboxType)
Creates and returns a mailbox for the given actor.
|
static boolean |
debug() |
void |
detach(ActorCell actor)
Detaches the specified actor instance from this dispatcher
|
protected abstract void |
dispatch(ActorCell receiver,
Envelope invocation)
Will be called when the dispatcher is to queue an invocation for execution
|
EventStream |
eventStream() |
static void |
execute(java.lang.Runnable runnable) |
protected abstract void |
executeTask(TaskInvocation invocation)
INTERNAL API
|
abstract java.lang.String |
id()
Identifier of this dispatcher, corresponds to the full key
of the dispatcher configuration.
|
long |
inhabitants() |
protected boolean |
isThroughputDeadlineTimeDefined()
INTERNAL API
|
Mailboxes |
mailboxes() |
static scala.concurrent.ExecutionContext |
prepare() |
static void |
printActors() |
protected void |
register(ActorCell actor)
If you override it, you must call it.
|
protected abstract boolean |
registerForExecution(Mailbox mbox,
boolean hasMessageHint,
boolean hasSystemMessageHint)
Suggest to register the provided mailbox for execution
|
void |
reportFailure(java.lang.Throwable t) |
static int |
RESCHEDULED() |
protected boolean |
resubmitOnBlock() |
protected void |
resume(ActorCell actor) |
static int |
SCHEDULED() |
protected abstract void |
shutdown()
Called one time every time an actor is detached from this dispatcher and this dispatcher has no actors left attached
Must be idempotent
|
protected abstract scala.concurrent.duration.FiniteDuration |
shutdownTimeout()
When the dispatcher no longer has any actors registered, how long will it wait until it shuts itself down,
defaulting to your akka configs "akka.actor.default-dispatcher.shutdown-timeout" or default specified in
reference.conf
|
protected void |
suspend(ActorCell actor)
After the call to this method, the dispatcher mustn't begin any new message processing for the specified reference
|
protected abstract void |
systemDispatch(ActorCell receiver,
SystemMessage invocation)
Will be called when the dispatcher is to queue an invocation for execution
|
protected abstract int |
throughput()
INTERNAL API
|
protected abstract scala.concurrent.duration.Duration |
throughputDeadlineTime()
INTERNAL API
|
protected void |
unbatchedExecute(java.lang.Runnable r) |
protected void |
unregister(ActorCell actor)
If you override it, you must call it.
|
static int |
UNSCHEDULED() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
batchable, execute
public MessageDispatcher(MessageDispatcherConfigurator configurator)
public static int UNSCHEDULED()
public static int SCHEDULED()
public static int RESCHEDULED()
public static final boolean debug()
public static Index<MessageDispatcher,ActorRef> actors()
public static void printActors()
public static java.lang.ThreadLocal<BatchingExecutor.AbstractBatch> akka$dispatch$BatchingExecutor$$_tasksLocal()
public static java.lang.ThreadLocal<scala.concurrent.BlockContext> akka$dispatch$BatchingExecutor$$_blockContext()
public static void execute(java.lang.Runnable runnable)
public static boolean batchable(java.lang.Runnable runnable)
protected abstract static void akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_tasksLocal_$eq(java.lang.ThreadLocal<BatchingExecutor.AbstractBatch> x$1)
protected abstract static void akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_blockContext_$eq(java.lang.ThreadLocal<scala.concurrent.BlockContext> x$1)
public static scala.concurrent.ExecutionContext prepare()
public MessageDispatcherConfigurator configurator()
public Mailboxes mailboxes()
public EventStream eventStream()
public final long inhabitants()
protected abstract Mailbox createMailbox(Cell actor, MailboxType mailboxType)
actor
- (undocumented)mailboxType
- (undocumented)public abstract java.lang.String id()
public final void attach(ActorCell actor)
actor
- (undocumented)public final void detach(ActorCell actor)
actor
- (undocumented)protected final boolean resubmitOnBlock()
resubmitOnBlock
in interface BatchingExecutor
protected final void unbatchedExecute(java.lang.Runnable r)
unbatchedExecute
in interface BatchingExecutor
public void reportFailure(java.lang.Throwable t)
reportFailure
in interface scala.concurrent.ExecutionContext
protected void register(ActorCell actor)
INTERNAL API
actor
- (undocumented)protected void unregister(ActorCell actor)
INTERNAL API
actor
- (undocumented)protected abstract scala.concurrent.duration.FiniteDuration shutdownTimeout()
INTERNAL API
protected void suspend(ActorCell actor)
actor
- (undocumented)protected void resume(ActorCell actor)
protected abstract void systemDispatch(ActorCell receiver, SystemMessage invocation)
INTERNAL API
receiver
- (undocumented)invocation
- (undocumented)protected abstract void dispatch(ActorCell receiver, Envelope invocation)
INTERNAL API
receiver
- (undocumented)invocation
- (undocumented)protected abstract boolean registerForExecution(Mailbox mbox, boolean hasMessageHint, boolean hasSystemMessageHint)
INTERNAL API
mbox
- (undocumented)hasMessageHint
- (undocumented)hasSystemMessageHint
- (undocumented)protected abstract int throughput()
protected abstract scala.concurrent.duration.Duration throughputDeadlineTime()
protected final boolean isThroughputDeadlineTimeDefined()
protected abstract void executeTask(TaskInvocation invocation)
invocation
- (undocumented)protected abstract void shutdown()
INTERNAL API