*
* @param message Message to send
* @param workerIndex Index of the worker to send the message to
*/
public void sendMessageToWorker(Writable message, int workerIndex) {
SendWorkerToWorkerMessageRequest request =
new SendWorkerToWorkerMessageRequest(message);
if (workerIndex == myWorkerIndex) {
request.doRequest(serviceWorker.getServerData());
} else {
serviceWorker.getWorkerClient().sendWritableRequest(
workerList.get(workerIndex).getTaskId(), request);
}
}