public class LegacyDispatcher extends AbstractDispatcher
Dispatcher implementation that mimics previously existing system.
All processing is done on caller threads.AbstractDispatcher.Bin, AbstractDispatcher.Bucket, AbstractDispatcher.StatusDispatcher.Order, Dispatcher.Stage, Dispatcher.Stat, Dispatcher.StatusListenertimer| Constructor and Description |
|---|
LegacyDispatcher(String... args) |
| Modifier and Type | Method and Description |
|---|---|
void |
in(Runnable task,
Bus bus,
String... agents)
Submits a task to process an incoming message or disconnection notification.
|
void |
initialize()
Initializes this dispatcher.
|
void |
out(Runnable task,
Bus bus,
Dispatcher.Order order)
Submits a task to process an outgoing message.
|
void |
shutdown()
Orderly shuts down this dispatcher.
|
addStatusListener, getIntArrayArg, getIntegerArg, getLogger, getStatus, removeStatusListener, report, updateStatisticspublic LegacyDispatcher(String... args)
public void initialize()
Dispatcherinitialize in interface Dispatcherinitialize in class AbstractDispatcherpublic void shutdown()
DispatcherMessagingLayer will not be closed until this method returns.shutdown in interface Dispatchershutdown in class AbstractDispatcherpublic void in(Runnable task, Bus bus, String... agents)
Dispatcher
If one or more agent names are given, the task if guaranteed to be executed after any previously submitted
tasks for the same bus and agent. If no agents are specified, the task is independent of other tasks,
subject to capacity controls imposed by the implementation of this service. If the agents argument
is null, the task is independent of other tasks, not subject to capacity controls.
Calling this method has no effect if this Dispatcher has not been initialized or it has been shut down. No exceptions are thrown in this case.
task - Task to be executed.bus - Bus (LOG, STATUS, or COMMAND).agents - Names of affected agents (source or disconnected).public void out(Runnable task, Bus bus, Dispatcher.Order order)
Dispatcher
Tasks submitted with outOfBand equal to false for the same bus are guaranteed to be
processed in the order of submission. If outOfBand equals true, the task is executed
independently of others, subject to capacity controls imposed by the implementation of this service.
If outOfBand equals null, the task is independent, not subject to capacity controls.
task - Task to be executed.bus - Bus (LOG, STATUS, or COMMAND).order - Order of execution and capacity control policies.Copyright © 2020 LSST. All rights reserved.