@Override
    public boolean equals(Object o) {
        if (!(o instanceof ControllerRegistration)) return false;
        ControllerRegistration other = (ControllerRegistration) o;
        return other.id == id &&
            other.incarnationId.equals(incarnationId) &&
            other.zkMigrationReady == zkMigrationReady &&
            other.listeners.equals(listeners) &&
            other.supportedFeatures.equals(supportedFeatures);
    }
An immutable class which represents controller registrations.
metadata/src/main/java/org/apache/kafka/metadata/ControllerRegistration.java