Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
    public class AlterQuotasEntry {
        /**
         * @param entity the entity whose config will be modified
         * @param ops the alteration to perform - if value is set, then the existing value is updated,
         *            otherwise if null, the existing value is cleared
         */
        public AlterQuotasEntry(Map<QuotaEntity, String> entity, Map<QuotaType, Double> ops);

        public Map<QuotaEntity, String> entity();
        public Map<QuotaType, Double> ops();
    }

    public class AlterQuotasOptions {
        // Default.
    }

    public class AlterQuotasResult {
        /**
         * @return map of a quota entity update to its future
         */
        public Map<Map<QuotaEntity, String>, KafkaFuture<Void>> futures();
    }

    public interface Admin extends AutoCloseable {
        /**
         * Alters the quotas as specified for the entries.
         *
         * @param alterations the alterations to perform
         * @return the result of the alterations
         */
        AlterQuotasResult alterQuotas(Collection<AlterQuotasEntry> entries, AlterQuotasOptions options);
    }

...