use of org.apache.kafka.common.feature.SupportedVersionRange in project kafka by apache.
the class ApiVersionsResponse method createSupportedFeatureKeys.
private static SupportedFeatureKeyCollection createSupportedFeatureKeys(Features<SupportedVersionRange> latestSupportedFeatures) {
SupportedFeatureKeyCollection converted = new SupportedFeatureKeyCollection();
for (Map.Entry<String, SupportedVersionRange> feature : latestSupportedFeatures.features().entrySet()) {
final SupportedFeatureKey key = new SupportedFeatureKey();
final SupportedVersionRange versionRange = feature.getValue();
key.setName(feature.getKey());
key.setMinVersion(versionRange.min());
key.setMaxVersion(versionRange.max());
converted.add(key);
}
return converted;
}
Aggregations