@Override
        public boolean equals(final Object o) {
            if (this == o) {
                return true;
            }
            if (Objects.isNull(o) || getClass() != o.getClass()) {
                return false;
            }
            HookEntry hookEntry = (HookEntry) o;
            return priority == hookEntry.priority && Objects.equals(hook, hookEntry.hook);
        }
Private structure to store ShutdownHook and its priority.
shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/shutdown/ShutdownHookManager.java