src/main/java/com/alipay/remoting/DefaultConnectionManager.java
@Override
    public void removeAll() {
        if (null == this.connTasks || this.connTasks.isEmpty()) {
            return;
        }
        if (null != this.connTasks && !this.connTasks.isEmpty()) {
            Iterator<String> iter = this.connTasks.keySet().iterator();
            while (iter.hasNext()) {
                String poolKey = iter.next();
                this.removeTask(poolKey);
                iter.remove();
            }
            logger.warn("All connection pool and connections have been removed!");
        }
    }
@Override
    public void removeAll() {
        if (null == this.connTasks || this.connTasks.isEmpty()) {
            return;
        }
        if (null != this.connTasks && !this.connTasks.isEmpty()) {
            Iterator<String> iter = this.connTasks.keySet().iterator();
            while (iter.hasNext()) {
                String poolKey = iter.next();
                this.removeTask(poolKey);
                iter.remove();
            }
            logger.warn("All connection pool and connections have been removed!");
        }
    }
@ Override public void removeAll ( ) { if ( null == this . connTasks || this . connTasks . isEmpty ( ) ) { return ; } if ( null != this . connTasks && ! this . connTasks . isEmpty ( ) ) { Iterator < String > iter = this . connTasks . keySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { String poolKey = iter . next ( ) ; this . removeTask ( poolKey ) ; iter . remove ( ) ; } logger . warn ( "All connection pool and connections have been removed!" ) ; } }
Warning! This is weakly consistent implementation, to prevent lock the whole {@link ConcurrentHashMap}.

@see ConnectionManager#removeAll()
Warning! This is weakly consistent implementation to prevent lock the whole { @link ConcurrentHashMap } .