Class MailboxProcessor.MailboxController
- java.lang.Object
-
- org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.MailboxController
-
- All Implemented Interfaces:
MailboxDefaultAction.Controller
- Enclosing class:
- MailboxProcessor
protected static final class MailboxProcessor.MailboxController extends Object implements MailboxDefaultAction.Controller
Implementation ofMailboxDefaultAction.Controllerthat is connected to aMailboxProcessorinstance.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMailboxController(MailboxProcessor mailboxProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallActionsCompleted()This method must be called to end the stream task when all actions for the tasks have been performed.MailboxDefaultAction.SuspensionsuspendDefaultAction()Same asMailboxDefaultAction.Controller.suspendDefaultAction(PeriodTimer)but without any associated timer measuring the idle time.MailboxDefaultAction.SuspensionsuspendDefaultAction(PeriodTimer suspensionPeriodTimer)Calling this method signals that the mailbox-thread should (temporarily) stop invoking the default action, e.g. because there is currently no input available.
-
-
-
Constructor Detail
-
MailboxController
protected MailboxController(MailboxProcessor mailboxProcessor)
-
-
Method Detail
-
allActionsCompleted
public void allActionsCompleted()
Description copied from interface:MailboxDefaultAction.ControllerThis method must be called to end the stream task when all actions for the tasks have been performed. This method can be invoked from any thread.- Specified by:
allActionsCompletedin interfaceMailboxDefaultAction.Controller
-
suspendDefaultAction
public MailboxDefaultAction.Suspension suspendDefaultAction(PeriodTimer suspensionPeriodTimer)
Description copied from interface:MailboxDefaultAction.ControllerCalling this method signals that the mailbox-thread should (temporarily) stop invoking the default action, e.g. because there is currently no input available. This method must be invoked from the mailbox-thread only!- Specified by:
suspendDefaultActionin interfaceMailboxDefaultAction.Controller- Parameters:
suspensionPeriodTimer- started (ticking)PeriodTimerthat measures how long the default action was suspended/idling. If mailbox loop is busy processing mails, this timer should be paused for the time required to process the mails.
-
suspendDefaultAction
public MailboxDefaultAction.Suspension suspendDefaultAction()
Description copied from interface:MailboxDefaultAction.ControllerSame asMailboxDefaultAction.Controller.suspendDefaultAction(PeriodTimer)but without any associated timer measuring the idle time.- Specified by:
suspendDefaultActionin interfaceMailboxDefaultAction.Controller
-
-