code: private void map(Resource root) {
  
          for (Resource.ResourceEntry serverGroup : root.getChildren(SERVER_GROUP)) {
              String serverGroupName = serverGroup.getName();
              ModelNode serverGroupModel = serverGroup.getModel();
              String profile = serverGroupModel.require(PROFILE).asString();
              store(serverGroupName, profile, profilesToGroups);
              String socketBindingGroup = serverGroupModel.require(SOCKET_BINDING_GROUP).asString();
              store(serverGroupName, socketBindingGroup, socketsToGroups);
  
              for (Resource.ResourceEntry deployment : serverGroup.getChildren(DEPLOYMENT)) {
                  store(serverGroupName, deployment.getName(), deploymentsToGroups);
              }
  
              for (Resource.ResourceEntry overlay : serverGroup.getChildren(DEPLOYMENT_OVERLAY)) {
                  store(serverGroupName, overlay.getName(), overlaysToGroups);
              }
  
          }
  
          for (Resource.ResourceEntry host : root.getChildren(HOST)) {
              String hostName = host.getPathElement().getValue();
              for (Resource.ResourceEntry serverConfig : host.getChildren(SERVER_CONFIG)) {
                  ModelNode serverConfigModel = serverConfig.getModel();
                  String serverGroupName = serverConfigModel.require(GROUP).asString();
                  store(serverGroupName, hostName, hostsToGroups);
              }
          }
      }
docs: Only call with monitor for 'this' held