public class JMWorkerStatusUpdater extends java.lang.Object implements IWorkerStatusUpdater, MessageHandler
Constructor and Description |
---|
JMWorkerStatusUpdater(RRClient rrClient,
int workerID,
Config config) |
Modifier and Type | Method and Description |
---|---|
boolean |
addWorkerFailureListener(IWorkerFailureListener workerFailureListener1)
only one IWorkerFailureListener can be added
if the second IWorkerFailureListener tried to be added, returns false
|
JobMasterAPI.WorkerState |
getWorkerStatusForID(int id)
return the status of any worker in the job
|
void |
onMessage(RequestID id,
int workerId,
Message message)
Handles a specific message type
|
boolean |
updateWorkerStatus(JobMasterAPI.WorkerState newState)
update the status of this worker in the job
each worker reports its status changes with this method
Dashboard, JobMaster and other workers get worker status updates
if status update is unsuccessful, return false
|
public boolean updateWorkerStatus(JobMasterAPI.WorkerState newState)
IWorkerStatusUpdater
updateWorkerStatus
in interface IWorkerStatusUpdater
public boolean addWorkerFailureListener(IWorkerFailureListener workerFailureListener1)
public JobMasterAPI.WorkerState getWorkerStatusForID(int id)
IWorkerStatusUpdater
getWorkerStatusForID
in interface IWorkerStatusUpdater
public void onMessage(RequestID id, int workerId, Message message)
MessageHandler
onMessage
in interface MessageHandler
id
- request idworkerId
- worker idmessage
- protbuf message