code: public void unregister(GracefulShutdownHook shutdownHook) {
          if (isShuttingDown.get()) {
              // Avoid any changes to the shutdown hooks set when the shutdown is already in progress
              throw new IllegalStateException("Couldn't unregister shutdown hook because shutdown is already in progress");
          }
          shutdownHooks.remove(requireNonNull(shutdownHook, "shutdownHook cannot be null"));
      }
docs: Remove a previously registered shutdown hook from the service.
  <p>
  This needs to be called if a registered service will be stopped before the server shuts down.
  @param shutdownHook a class that implements {@link GracefulShutdownHook}
  @throws IllegalStateException if the server shutdown is already in progress and the hook cannot be unregistered
  @throws NullPointerException if the shutdown hook argument is null