{
if (consistencyLevel == ConsistencyLevel.ANY)
{
// ensure there are blockFor distinct living nodes (hints are ok).
if (hintedEndpoints.keySet().size() < responses.get())
throw new UnavailableException();
}
// count destinations that are part of the desired target set
int liveNodes = 0;
for (InetAddress destination : hintedEndpoints.keySet())
{
if (writeEndpoints.contains(destination))
liveNodes++;
}
if (liveNodes < responses.get())
{
throw new UnavailableException();
}
}