code: public void clear() {
      List<Socket> socketsToClear = new LinkedList<Socket>();
      synchronized(multimap) {
        for (Socket sock : multimap.values()) {
          socketsToClear.add(sock);
        }
        multimap.clear();
      }
      
      for (Socket sock : socketsToClear) {
        IOUtils.closeSocket(sock);
      }
    }
docs: Empty the cache, and close all sockets.