{
// TODO: We need to log error responses here for example
// if a write fails for a key log that the key could not be replicated
boolean returnValue = false;
for (Message response : responses) {
WriteResponse writeResponseMessage = null;
try
{
writeResponseMessage = WriteResponse.serializer().deserialize(new DataInputStream(new ByteArrayInputStream(response.getMessageBody())));
}
catch (IOException e)
{
throw new RuntimeException(e);
}
boolean result = writeResponseMessage.isSuccess();
if (!result) {
if (logger_.isDebugEnabled())
logger_.debug("Write at " + response.getFrom()
+ " may have failed for the key " + writeResponseMessage.key());
}
returnValue |= result;
}
return returnValue;
}