Code example for ConcurrentHashMap

Methods: clear, putAll

0
 
    public void setMaxForRoutes(final Map<HttpRoute, Integer> map) {
        if (map == null) {
            return; 
        } 
        this.maxPerHostMap.clear();
        this.maxPerHostMap.putAll(map);
    } 
 
    @Override 
    public String toString() {
        return this.maxPerHostMap.toString();
    } 
 
}