code: NotificationHandlerNodeSubregistry getOrCreateSubregistry(final String key) {
          for (;;) {
              final Map<String, NotificationHandlerNodeSubregistry> snapshot = childrenUpdater.get(this);
              final NotificationHandlerNodeSubregistry subregistry = snapshot.get(key);
              if (subregistry != null) {
                  return subregistry;
              } else {
                  final NotificationHandlerNodeSubregistry newRegistry = new NotificationHandlerNodeSubregistry(key, this);
                  if (childrenUpdater.putAtomic(this, key, newRegistry, snapshot)) {
                      return newRegistry;
                  }
                  // otherwise, retry the loop because the map changed
              }
          }
      }
docs: Create a {@code NotificationHandlerNodeSubregistry} for the give {@code key} or use the existing one if it already exists.
  
  Copied from {@link org.jboss.as.controller.registry.ConcreteResourceRegistration#getOrCreateSubregistry(String)}