/** * reconnect to @param remoteEP (after the current message backlog is exhausted). Used by * Ec2MultiRegionSnitch to force nodes in the same region to communicate over their private IPs. * * @param remoteEP */ public void reset(InetAddress remoteEP) { resetedEndpoint = remoteEP; for (OutboundTcpConnection conn : new OutboundTcpConnection[] {cmdCon, ackCon}) conn.softCloseSocket(); // release previous metrics and create new one with reset address metrics.release(); metrics = new ConnectionMetrics(resetedEndpoint, this); }
public long getRecentTimeouts() { return metrics.getRecentTimeout(); }
public void close() { // these null guards are simply for tests if (ackCon != null) ackCon.closeSocket(true); if (cmdCon != null) cmdCon.closeSocket(true); metrics.release(); }