THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public interface AlterConfigPolicy extends Configurable, AutoCloseable { class RequestMetadata { private final ConfigResource resource; private final Map<String, String> proposedConfigs; private final List<String> proposedConfigsToDelete; private final Map<String, String> existingConfigsresultingConfigs; public RequestMetadata(ConfigResource resource, Map<String, String> proposedConfigs) { this.resource = resource; this.proposedConfigs = proposedConfigs; this.existingConfigsresultingConfigs = Collections.emptyMap(); this.proposedConfigsToDelete = Collections.emptyList(); } public RequestMetadata(ConfigResource resource, Map<String, String> proposedConfigs, List<String> proposedConfigsToDelete, Map<String, String> existingConfigsresultingConfigs) { this.resource = resource; this.proposedConfigs = proposedConfigs; this.existingConfigsresultingConfigs = existingConfigsresultingConfigs; this.proposedConfigsToDelete = proposedConfigsToDelete; } // ... public List<String> proposedConfigsToDelete() { return proposedConfigsToDelete; } public Map<String, String> existingConfigsresultingConfigs() { return existingConfigsresultingConfigs; } // ... void validate(RequestMetadata requestMetadata) throws PolicyViolationException; } |
Where:
resultingConfigs
includes the altered configurations: existing and proposed configurations merged.proposedConfigs
includes the requested configurations, including null values when configuration is requested to be deleted.
Proposed Changes
Enable Managers to use the new property:
...