protected static final class MailboxProcessor.MailboxController extends Object implements MailboxDefaultAction.Controller
MailboxDefaultAction.Controller
that is connected to a MailboxProcessor
instance.Modifier | Constructor and Description |
---|---|
protected |
MailboxController(MailboxProcessor mailboxProcessor) |
Modifier and Type | Method and 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 as
MailboxDefaultAction.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.
|
protected MailboxController(MailboxProcessor mailboxProcessor)
public void allActionsCompleted()
MailboxDefaultAction.Controller
allActionsCompleted
in interface MailboxDefaultAction.Controller
public MailboxDefaultAction.Suspension suspendDefaultAction(PeriodTimer suspensionPeriodTimer)
MailboxDefaultAction.Controller
suspendDefaultAction
in interface MailboxDefaultAction.Controller
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.public MailboxDefaultAction.Suspension suspendDefaultAction()
MailboxDefaultAction.Controller
MailboxDefaultAction.Controller.suspendDefaultAction(PeriodTimer)
but without any associated timer
measuring the idle time.suspendDefaultAction
in interface MailboxDefaultAction.Controller
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.