code: public void registerDependency(final Registry registry) throws CouldNotPerformException {
          if (registry == null) {
              throw new NotAvailableException("registry");
          }
          registryLock.writeLock().lock();
          try {
              dependingRegistryMapLock.writeLock().lock();
              try {
                  // check if already registered
                  if (dependingRegistryMap.containsKey(registry)) {
                      return;
                  }
                  dependingRegistryMap.put(registry, new DependencyConsistencyCheckTrigger(registry));
              } finally {
                  dependingRegistryMapLock.writeLock().unlock();
              }
          } finally {
              registryLock.writeLock().unlock();
          }
      }
docs: If this registry depends on other registries, this method can be used to tell this registry all depending registries.
  For instance this is used to switch to read only mode in case one depending registry is not consistent.
  Consistency checks are skipped as well if at least one depending registry is not consistent.
  <p>
  NOTE: the registered dependencies have to be activated later by calling {@link #activateDependencies()}.
  
  @param registry the dependency of these registry.
  
  @throws org.openbase.jul.exception.CouldNotPerformException