@Override
    public int compareTo(ConfigKey<?> o) {
        if (!o.getNamespace().equals(getNamespace())) return getNamespace().compareTo(o.getNamespace());
        if (!o.getName().equals(getName())) return getName().compareTo(o.getName());
        return getConfigId().compareTo(o.getConfigId());
    }
Comparison sort order: namespace, name, configId.
config/src/main/java/com/yahoo/vespa/config/ConfigKey.java