private void checkForest(Set<Sensor> sensors) {
        if (!sensors.add(this))
            throw new IllegalArgumentException("Circular dependency in sensors: " + name() + " is its own parent.");
        for (Sensor parent : parents)
            parent.checkForest(sensors);
    }
Case insensitive lookup by protocol name
clients/src/main/java/org/apache/kafka/common/metrics/Sensor.java