public class JobMonitor extends TopologyListenerAdapter implements JobMonitoringHandler
| Constructor and Description |
|---|
JobMonitor(JobMonitorUpdateMode updateMode,
long period,
TopologyManager topologyManager,
JobMonitoringListener... listeners)
Initialize this job manager with the specified topology manager and event mode.
|
JobMonitor(TopologyManager topologyManager,
JobMonitoringListener... listeners)
Initialize this job manager with the specified topology manager in
IMMEDIATE_NOTFICATIONS mode. |
| Modifier and Type | Method and Description |
|---|---|
void |
addJobMonitoringListener(JobMonitoringListener listener)
Add a listener to the events emitted by this job monitor.
|
void |
close() |
List<JobDispatch> |
getAllJobDispatches(String jobUuid)
Get the dispatches of the specified job accrosss the entire topology.
|
List<JobDriver> |
getDriversForJob(String jobUuid)
Get the drivers to which a job was submitted, either in parallel from the same client, or from one driver to another in a multi-driver topology.
|
JobDriver |
getJobDriver(String driverUuid)
Get the driver with the specified uuid.
|
List<JobDriver> |
getJobDrivers()
Get the drivers monitored by this job monitor.
|
TopologyManager |
getTopologyManager()
Get the topology manager associated with this job monitor.
|
void |
removeJobMonitoringListener(JobMonitoringListener listener)
Remove a listener to the events emitted by this job monitor.
|
driverAdded, driverRemoved, driverUpdated, nodeAdded, nodeRemoved, nodeUpdatedpublic JobMonitor(TopologyManager topologyManager, JobMonitoringListener... listeners)
IMMEDIATE_NOTFICATIONS mode.topologyManager - the topology manager to use.listeners - optional listeners that can be registered immediately with this job monitor.public JobMonitor(JobMonitorUpdateMode updateMode, long period, TopologyManager topologyManager, JobMonitoringListener... listeners)
updateMode - the update mode which determines how job monitoring events are generated.period - the interval between publications of updates. This is not used in IMMEDIATE_NOTFICATIONS mode.topologyManager - the topology manager to use.listeners - optional listeners that can be registered immediately with this job monitor.public TopologyManager getTopologyManager()
TopologyManager object.public JobDriver getJobDriver(String driverUuid)
driverUuid - the uuid of the driver to retrieve.JobDriver object, or null if there si no such driver.public List<JobDriver> getJobDrivers()
JobDriver objects.public List<JobDriver> getDriversForJob(String jobUuid)
jobUuid - the uuid of the job for which to find the drivers.JobDriver instances, possibly empty.public List<JobDispatch> getAllJobDispatches(String jobUuid)
jobUuid - the uuid of the job for which to find the dispatches.JobDispatch instances, possibly empty.public void addJobMonitoringListener(JobMonitoringListener listener)
listener - the listener to add.public void removeJobMonitoringListener(JobMonitoringListener listener)
listener - the listener to remove.public void close()
close in interface AutoCloseableclose in interface JobMonitoringHandlerCopyright © 2005-2019 JPPF Team.