@Override
  public void destroyConnection(ConnectedChannel connectedChannel) {
    final Timer.Context context = connectionDestroyTime.time();
    try {
      BlockingChannelInfo blockingChannelInfo =
          connections.get(connectedChannel.getRemoteHost() + connectedChannel.getRemotePort());
      if (blockingChannelInfo == null) {
        logger.error("Unexpected state in connection pool. Host {} and port {} not found to checkin connection",
            connectedChannel.getRemoteHost(), connectedChannel.getRemotePort());
        throw new IllegalArgumentException("Connection does not belong to the pool");
      }
      blockingChannelInfo.destroyBlockingChannel((BlockingChannel) connectedChannel);
      logger.trace("Destroying connection for host {} and port {}", connectedChannel.getRemoteHost(),
          connectedChannel.getRemotePort());
    } finally {
      context.stop();
    }
  }
A connection pool that uses BlockingChannel as the underlying connection.
It is responsible for all the connection management. It helps to
checkout a new connection, checkin an existing connection that has been
checked out and destroy a connection in the case of an error
ambry-network/src/main/java/com/github/ambry/network/BlockingChannelConnectionPool.java