code: protected void registerShutdownHook() {
          if (suppressShutdownHook) {
              return;
          }
          final File markFile = prepareMarkFile();
          final long lastModified = markFile.lastModified();
          final String exp = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS").format(new Date(lastModified));
          info("...Registering the shutdown hook for the Tomcat: lastModified=" + exp);
          new Thread(() -> {
              while (true) {
                  if (needsShutdown(markFile, lastModified)) {
                      shutdownForcedly();
                      break;
                  }
                  waitForNextShuwdownHook();
              }
          }).start();
      }
docs: -------------