public void replay(ClientQuotaRecord record) {
        Map<String, String> entityMap = new HashMap<>(2);
        record.entity().forEach(entityData -> entityMap.put(entityData.entityType(), entityData.entityName()));
        ClientQuotaEntity entity = new ClientQuotaEntity(entityMap);
        TimelineHashMap<String, Double> quotas = clientQuotaData.get(entity);
        if (quotas == null) {
            quotas = new TimelineHashMap<>(snapshotRegistry, 0);
            clientQuotaData.put(entity, quotas);
        }
        if (record.remove()) {
            quotas.remove(record.key());
            if (quotas.isEmpty()) {
                clientQuotaData.remove(entity);
            }
            log.info("Replayed ClientQuotaRecord for {} removing {}.", entity, record.key());
        } else {
            quotas.put(record.key(), record.value());
            log.info("Replayed ClientQuotaRecord for {} setting {} to {}.",
                    entity, record.key(), record.value());
        }
    }
Apply a quota record to the in-memory state.

@param record    A ClientQuotaRecord instance.
metadata/src/main/java/org/apache/kafka/controller/ClientQuotaControlManager.java