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.Controller
that is connected to aMailboxProcessor
instance.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MailboxController(MailboxProcessor mailboxProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allActionsCompleted()
This method must be called to end the stream task when all actions for the tasks have been performed.MailboxDefaultAction.Suspension
suspendDefaultAction()
Same asMailboxDefaultAction.Controller.suspendDefaultAction(PeriodTimer)
but without any associated timer measuring the idle time.MailboxDefaultAction.Suspension
suspendDefaultAction(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.Controller
This 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:
allActionsCompleted
in interfaceMailboxDefaultAction.Controller
-
suspendDefaultAction
public MailboxDefaultAction.Suspension suspendDefaultAction(PeriodTimer suspensionPeriodTimer)
Description copied from interface:MailboxDefaultAction.Controller
Calling 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:
suspendDefaultAction
in interfaceMailboxDefaultAction.Controller
- Parameters:
suspensionPeriodTimer
- started (ticking)PeriodTimer
that 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.Controller
Same asMailboxDefaultAction.Controller.suspendDefaultAction(PeriodTimer)
but without any associated timer measuring the idle time.- Specified by:
suspendDefaultAction
in interfaceMailboxDefaultAction.Controller
-
-