public void removeAllDependencies ( ) { registryLock . writeLock ( ) . lock ( ) ; try { dependingRegistryMapLock . writeLock ( ) . lock ( ) ; try { List < Registry > dependingRegistryList = new ArrayList <> ( dependingRegistryMap . keySet ( ) ) ; Collections . reverse ( dependingRegistryList ) ; dependingRegistryList . stream ( ) . forEach ( ( registry ) - > { dependingRegistryMap . remove ( registry ) . shutdown ( ) ; } ) ; } finally { dependingRegistryMapLock . writeLock ( ) . unlock ( ) ; } } finally { registryLock . writeLock ( ) . unlock ( ) ; } }
Removal of all registered registry dependencies in the reversed order in which they where added .