@Override
    public int compareTo(final Delayed delayed) {
        boolean other = delayed instanceof TimerTaskList;
        if (other) {
            long expiration = ((TimerTaskList) delayed).getExpiration();
            return Long.compare(getExpiration(), expiration);
        } else {
            return -1;
        }
    }
Traversing using this is thread-safe.

@param consumer the consumer
shenyu-common/src/main/java/org/apache/shenyu/common/timer/TimerTaskList.java