class RegistryFactory {

    public static void destroyAll() {
        for (Map.Entry<RegistryConfig, Registry> entry : ALL_REGISTRIES.entrySet()) {
            RegistryConfig config = entry.getKey();
            Registry registry = entry.getValue();
            try {
                registry.destroy();
                ALL_REGISTRIES.remove(config);
            } catch (Exception e) {
                LOGGER.error(LogCodes.getLog(LogCodes.ERROR_DESTRORY_REGISTRY, config), e);
            }
        }
    }

}