public void addShutdownHook(final Runnable shutdownHook, final int priority) {
        if (Objects.isNull(shutdownHook)) {
            throw new IllegalArgumentException("shutdownHook cannot be NULL");
        }
        if (shutdownInProgress.get()) {
            throw new IllegalStateException("Shutdown in progress, cannot add a shutdownHook");
        }
        hooks.add(new HookEntry(shutdownHook, priority));
    }
Adds a shutdownHook with a priority, the higher the priority
the earlier will run. ShutdownHooks with same priority run
in a non-deterministic order.

@param shutdownHook shutdownHook <code>Runnable</code>
@param priority     priority of the shutdownHook.
shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/shutdown/ShutdownHookManager.java