use of org.apache.kafka.common.feature.FinalizedVersionRange in project kafka by apache.
the class ApiVersionsResponse method createFinalizedFeatureKeys.
private static FinalizedFeatureKeyCollection createFinalizedFeatureKeys(Features<FinalizedVersionRange> finalizedFeatures) {
FinalizedFeatureKeyCollection converted = new FinalizedFeatureKeyCollection();
for (Map.Entry<String, FinalizedVersionRange> feature : finalizedFeatures.features().entrySet()) {
final FinalizedFeatureKey key = new FinalizedFeatureKey();
final FinalizedVersionRange versionLevelRange = feature.getValue();
key.setName(feature.getKey());
key.setMinVersionLevel(versionLevelRange.min());
key.setMaxVersionLevel(versionLevelRange.max());
converted.add(key);
}
return converted;
}
Aggregations