class FunctionRegistryHolder implements AutoCloseable {

  public void addJars(Map<String, List<FunctionHolder>> newJars, int version) {
    try (@SuppressWarnings("unused") Closeable lock = writeLock.open()) {
      for (Map.Entry<String, List<FunctionHolder>> newJar : newJars.entrySet()) {
        String jarName = newJar.getKey();
        removeAllByJar(jarName);
        Map<String, Queue<String>> jar = new ConcurrentHashMap<>();
        jars.put(jarName, jar);
        addFunctions(jar, newJar.getValue());
      }
      this.version = version;
    }
  }

  public  FunctionRegistryHolder();

}