コード例 #1
0
  /**
   * 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);
  }
コード例 #2
0
 public long getRecentTimeouts() {
   return metrics.getRecentTimeout();
 }
コード例 #3
0
 public void close() {
   // these null guards are simply for tests
   if (ackCon != null) ackCon.closeSocket(true);
   if (cmdCon != null) cmdCon.closeSocket(true);
   metrics.release();
 }