use of org.apache.kafka.common.message.AlterClientQuotasRequestData.OpData in project kafka by apache.
the class AlterClientQuotasRequest method entries.
public List<ClientQuotaAlteration> entries() {
List<ClientQuotaAlteration> entries = new ArrayList<>(data.entries().size());
for (EntryData entryData : data.entries()) {
Map<String, String> entity = new HashMap<>(entryData.entity().size());
for (EntityData entityData : entryData.entity()) {
entity.put(entityData.entityType(), entityData.entityName());
}
List<ClientQuotaAlteration.Op> ops = new ArrayList<>(entryData.ops().size());
for (OpData opData : entryData.ops()) {
Double value = opData.remove() ? null : opData.value();
ops.add(new ClientQuotaAlteration.Op(opData.key(), value));
}
entries.add(new ClientQuotaAlteration(new ClientQuotaEntity(entity), ops));
}
return entries;
}
Aggregations