{
for(Iterator i = replicants.entrySet().iterator(); i.hasNext(); )
{
Map.Entry entry = (Map.Entry)i.next();
Integer nid = (Integer)entry.getKey();
FailoverStatus status = (FailoverStatus)entry.getValue();
if (status.isFailedOverForNode(failedNodeID))
{
log.debug(this + ": failover is complete on node " + nid);
return nid.intValue();
}
else if (status.isFailingOverForNode(failedNodeID))
{
log.debug(this + ": fail over is in progress on node " + nid);
// A server has started failing over for the failed node, but not completed.
// If it's not this node then we immediately return so the connection can be