class AdapterRegistry implements AdapterRegistryMBean {

  @Override
  public Set<ObjectName> reloadFromConfig() throws MalformedObjectNameException, CoreException, MalformedURLException, IOException {
    for (ObjectName o : getAdapters()) {
      destroyAdapter(o);
    }
    Set<ObjectName> result = new HashSet<>();
    for (AdapterBuilder builder : builderByProps.values()) {
      result.add(builder.createAdapter());
    }
    return result;
  }

  private  AdapterRegistry();

}