Optional<Integer> findOneStaleBroker0() {

        BrokerHeartbeatStateIterator iterator = unfenced.iterator();
        if (iterator.hasNext()) {
            BrokerHeartbeatState broker = iterator.next();
            // The unfenced list is sorted on last contact time from each
            // broker. If the first broker is not stale, then none is.
            if (!hasValidSession(broker)) {
                return Optional.of(broker.id);
            }
        }
        return Optional.empty();
    }
Check if the oldest broker to have heartbeated has already violated the
sessionTimeoutNs timeout and needs to be fenced.

@return      An Optional broker node id.
metadata/src/main/java/org/apache/kafka/controller/BrokerHeartbeatManager.java