if (!response.wasReceived()) {
if (log.isDebugEnabled())
log.debug("Response from node " + response.getSender() + " was not received.");
throw new ChannelException("Node " + response.getSender() + " failed to respond.");
}
if (response.wasSuspected()) {
if (log.isDebugEnabled())
log.debug("Node " + response.getSender() + " was suspected.");
return PROCESS_SKIP;
}
Object object = response.getValue();
// we received exception/error, something went wrong
// on one of the nodes... and we do not handle such faults
if (object instanceof Throwable) {
throw new ChannelException("Node " + response.getSender() + " is faulty.");
}
if (object == null) {
return PROCESS_SKIP;
}
// it is always interesting to know the class that caused failure...
if (!(object instanceof VoteResult)) {
String faultClass = object.getClass().getName();
// ...but we do not handle byzantine faults
throw new ChannelException("Node " + response.getSender() + " generated fault (class " + faultClass + ')');
}
// what if we received the response from faulty node?
if (object instanceof FailureVoteResult) {