public boolean hasOnlineDir(Uuid dir) {
        return DirectoryId.isOnline(dir, directories);
    }
An immutable class which represents broker registrations.
metadata/src/main/java/org/apache/kafka/metadata/BrokerRegistration.java