Search in sources :

Example 1 with WorkerMessage

use of com.bakdata.conquery.models.messages.namespaces.WorkerMessage in project conquery by bakdata.

the class ForwardToWorker method react.

@Override
public void react(ShardNodeNetworkContext context) throws Exception {
    Worker worker = Objects.requireNonNull(context.getWorkers().getWorker(workerId));
    ConqueryMDC.setLocation(worker.toString());
    WorkerMessage message = deserializeMessage(messageRaw, context.getWorkers().getBinaryMapper());
    if (message instanceof SlowMessage) {
        ((SlowMessage) message).setProgressReporter(progressReporter);
    }
    message.react(worker);
}
Also used : WorkerMessage(com.bakdata.conquery.models.messages.namespaces.WorkerMessage) Worker(com.bakdata.conquery.models.worker.Worker) SlowMessage(com.bakdata.conquery.models.messages.SlowMessage)

Aggregations

SlowMessage (com.bakdata.conquery.models.messages.SlowMessage)1 WorkerMessage (com.bakdata.conquery.models.messages.namespaces.WorkerMessage)1 Worker (com.bakdata.conquery.models.worker.Worker)1