if (handler.endpoints.size() == 1)
return;
// send the other endpoints a digest request
ReadCommand digestCommand = command.copy();
digestCommand.setDigestQuery(true);
MessageOut<?> message = null;
for (int i = 1; i < handler.endpoints.size(); i++)
{
InetAddress digestPoint = handler.endpoints.get(i);
if (digestPoint.equals(FBUtilities.getBroadcastAddress()))
{
logger.trace("reading digest locally");
StageManager.getStage(Stage.READ).execute(new LocalReadRunnable(digestCommand, handler));
}
else
{
logger.trace("reading digest from {}", digestPoint);
// (We lazy-construct the digest Message object since it may not be necessary if we
// are doing a local digest read, or no digest reads at all.)
if (message == null)
message = digestCommand.createMessage();
MessagingService.instance().sendRR(message, digestPoint, handler);
}
}
}