public void shutdown ( ) { synchronized ( configCache ) { Set < ClassLoader > allClassLoaders = new HashSet <> ( ) ; allClassLoaders . addAll ( configCache . keySet ( ) ) ; //create a copy of the keys so that we avoid a ConcurrentModificationException for ( ClassLoader classLoader : allClassLoaders ) { close ( classLoader ) ; } //caches should be empty now but clear them anyway configCache . clear ( ) ; appClassLoaderMap . clear ( ) ; } }
Close down all the configs