use of org.apache.cassandra.concurrent.LocalAwareExecutorService in project cassandra by apache.
the class MessagingService method receive.
public void receive(MessageIn message, int id) {
TraceState state = Tracing.instance.initializeFromMessage(message);
if (state != null)
state.trace("{} message received from {}", message.verb, message.from);
// message sinks are a testing hook
for (IMessageSink ms : messageSinks) if (!ms.allowIncomingMessage(message, id))
return;
Runnable runnable = new MessageDeliveryTask(message, id);
LocalAwareExecutorService stage = StageManager.getStage(message.getMessageType());
assert stage != null : "No stage for message type " + message.verb;
stage.execute(runnable, ExecutorLocals.create(state));
}
Aggregations