@Internal public final class MailboxExecutorImpl extends Object implements MailboxExecutor
EMPTY_ARGS| Constructor and Description |
|---|
MailboxExecutorImpl(TaskMailbox mailbox,
int priority,
StreamTaskActionExecutor actionExecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.apache.flink.util.function.RunnableWithException command,
String descriptionFormat,
Object... descriptionArgs)
Executes the given command at some time in the future in the mailbox thread.
|
boolean |
tryYield()
This methods attempts to run the command at the head of the mailbox.
|
void |
yield()
This methods starts running the command at the head of the mailbox and is intended to be used by the mailbox
thread to yield from a currently ongoing action to another command.
|
public MailboxExecutorImpl(@Nonnull TaskMailbox mailbox, int priority, StreamTaskActionExecutor actionExecutor)
public void execute(@Nonnull org.apache.flink.util.function.RunnableWithException command, String descriptionFormat, Object... descriptionArgs)
MailboxExecutorAn optional description can (and should) be added to ease debugging and error-reporting. The description
may contain placeholder that refer to the provided description arguments using Formatter
syntax. The actual description is only formatted on demand.
execute in interface MailboxExecutorcommand - the runnable task to add to the mailbox for execution.descriptionFormat - the optional description for the command that is used for debugging and error-reporting.descriptionArgs - the parameters used to format the final description string.public void yield()
throws InterruptedException
MailboxExecutoryield in interface MailboxExecutorInterruptedException - on interruption.public boolean tryYield()
MailboxExecutortryYield in interface MailboxExecutorCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.