code: PathEventContextImpl checkRestartRequired(OperationContext operationContext, String name, Event event) {
          Set<String> allEntries = null;
          synchronized (pathEntries) {
              if (event == Event.UPDATED) {
                  allEntries = new LinkedHashSet<String>();
                  allEntries.add(name);
                  getAllDependentsForRestartCheck(allEntries, name);
              } else {
                  allEntries = Collections.singleton(name);
              }
          }
  
          Map<String, Set<Callback>> triggerCallbacks = new LinkedHashMap<String, Set<Callback>>();
          synchronized (callbacks) {
              for (String pathName : allEntries) {
                  Map<Event, Set<Callback>> callbacksByEvent = callbacks.get(pathName);
                  if (callbacksByEvent != null) {
                      Set<Callback> callbacksForEntry = callbacksByEvent.get(event);
                      if (callbacksForEntry != null) {
                          triggerCallbacks.put(pathName, new LinkedHashSet<Callback>(callbacksForEntry));
                      }
                  }
              }
          }
  
          PathEventContextImpl pathEventContext = new PathEventContextImpl(operationContext, event);
          for (Map.Entry<String, Set<Callback>> entry : triggerCallbacks.entrySet()) {
              for (Callback cb : entry.getValue()) {
                  cb.pathModelEvent(pathEventContext, entry.getKey());
                  if (pathEventContext.restart) {
                      return pathEventContext;
                  }
              }
          }
          return pathEventContext;
      }
docs: Creates a {@link org.jboss.as.controller.services.path.PathManager.PathEventContext} and passes it to the
  {@link org.jboss.as.controller.services.path.PathManager.Callback#pathModelEvent(PathEventContext, String)} method
  of any callbacks to allow the to record if the event should trigger a restart or reload required state. The caller
  can then use the {@link PathEventContextImpl#isInstallServices()} method to check if further updates to
  the path manager should be made.
  @param operationContext the operation context associated with the management operation making this request
  @param name  the name of the relevant path. Cannot be {@code null}
  @param event the event. Cannot be {@code null}
  @return the path event context to use to check if further updates should be made