void handleBrokerChange(BrokerRegistration prev, BrokerRegistration next) {
        boolean wasFenced = false;
        boolean wasActive = false;
        boolean wasZk = false;
        if (prev != null) {
            wasFenced = prev.fenced();
            wasActive = !prev.fenced();
            wasZk = prev.isMigratingZkBroker();
        }
        boolean isFenced = false;
        boolean isActive = false;
        boolean isZk = false;
        if (next != null) {
            isFenced = next.fenced();
            isActive = !next.fenced();
            isZk = next.isMigratingZkBroker();
        }
        fencedBrokersChange += delta(wasFenced, isFenced);
        activeBrokersChange += delta(wasActive, isActive);
        migratingZkBrokersChange += delta(wasZk, isZk);
    }
Calculates the change between two boolean values, expressed as an integer.
metadata/src/main/java/org/apache/kafka/controller/metrics/ControllerMetricsChanges.java