assert endPoint != null;
Message message = command.makeReadMessage();
if (logger.isDebugEnabled())
logger.debug("weakreadremote reading " + command + " from " + message.getMessageId() + "@" + endPoint);
message.addHeader(ReadCommand.DO_REPAIR, ReadCommand.DO_REPAIR.getBytes());
IAsyncResult iar = MessagingService.getMessagingInstance().sendRR(message, endPoint);
byte[] body;
try
{
body = iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS);
}
catch (TimeoutException e)
{
throw new RuntimeException("error reading key " + command.key, e);
// TODO retry to a different endpoint?