void add(BrokerHeartbeatState broker) {
            BrokerHeartbeatState cur = head.prev;
            while (true) {
                if (cur == head || cur.lastContactNs <= broker.lastContactNs) {
                    broker.next = cur.next;
                    cur.next.prev = broker;
                    broker.prev = cur;
                    cur.next = broker;
                    break;
                }
                cur = cur.prev;
            }
        }
Add the broker to the list. We start looking for a place to put it at the end
of the list.
metadata/src/main/java/org/apache/kafka/controller/BrokerHeartbeatManager.java