BrokerControlState currentBrokerState(BrokerHeartbeatState broker) {
        if (broker.shuttingDown()) {
            return CONTROLLED_SHUTDOWN;
        } else if (broker.fenced()) {
            return FENCED;
        } else {
            return UNFENCED;
        }
    }
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