@Internal public final class MailboxExecutorImpl extends Object implements MailboxExecutor
EMPTY_ARGS| 构造器和说明 |
|---|
MailboxExecutorImpl(TaskMailbox mailbox,
int priority,
StreamTaskActionExecutor actionExecutor) |
MailboxExecutorImpl(TaskMailbox mailbox,
int priority,
StreamTaskActionExecutor actionExecutor,
MailboxProcessor mailboxProcessor) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute(org.apache.flink.util.function.ThrowingRunnable<? extends Exception> command,
String descriptionFormat,
Object... descriptionArgs)
Executes the given command at some time in the future in the mailbox thread.
|
boolean |
isIdle() |
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 MailboxExecutorImpl(@Nonnull TaskMailbox mailbox, int priority, StreamTaskActionExecutor actionExecutor, MailboxProcessor mailboxProcessor)
public boolean isIdle()
public void execute(org.apache.flink.util.function.ThrowingRunnable<? extends Exception> 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 在接口中 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 在接口中 MailboxExecutorInterruptedException - on interruption.public boolean tryYield()
MailboxExecutortryYield 在接口中 MailboxExecutorCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.