use of org.apache.cassandra.net.MessageOut in project cassandra by apache.
the class Gossiper method markAlive.
private void markAlive(final InetAddress addr, final EndpointState localState) {
localState.markDead();
MessageOut<EchoMessage> echoMessage = new MessageOut<EchoMessage>(MessagingService.Verb.ECHO, EchoMessage.instance, EchoMessage.serializer);
logger.trace("Sending a EchoMessage to {}", addr);
IAsyncCallback echoHandler = new IAsyncCallback() {
public boolean isLatencyForSnitch() {
return false;
}
public void response(MessageIn msg) {
realMarkAlive(addr, localState);
}
};
MessagingService.instance().sendRR(echoMessage, addr, echoHandler);
}
use of org.apache.cassandra.net.MessageOut in project cassandra by apache.
the class RepairMessageVerbHandler method logErrorAndSendFailureResponse.
private void logErrorAndSendFailureResponse(String errorMessage, InetAddress to, int id) {
logger.error(errorMessage);
MessageOut reply = new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE).withParameter(MessagingService.FAILURE_RESPONSE_PARAM, MessagingService.ONE_BYTE);
MessagingService.instance().sendReply(reply, id, to);
}
Aggregations