void register(int brokerId, boolean fenced) {
        BrokerHeartbeatState broker = brokers.get(brokerId);
        long metadataOffset = -1L;
        if (broker == null) {
            broker = new BrokerHeartbeatState(brokerId);
            brokers.put(brokerId, broker);
        } else if (broker.fenced() != fenced) {
            metadataOffset = broker.metadataOffset;
        }
        touch(brokerId, fenced, metadataOffset);
    }
Register this broker if we haven't already, and make sure its fencing state is
correct.

@param brokerId          The broker ID.
@param fenced            True only if the broker is currently fenced.
metadata/src/main/java/org/apache/kafka/controller/BrokerHeartbeatManager.java