public Map<String, String> toConfig() { HashMap<String, String> configs = new HashMap<>(); configs.put(String.format(SYSTEM_CONFIG_KEY, streamId), getSystemName()); this.physicalNameOptional.ifPresent(physicalName -> configs.put(String.format(PHYSICAL_NAME_CONFIG_KEY, streamId), physicalName)); this.streamConfigs.forEach((key, value) -> configs.put(String.format(STREAM_CONFIGS_CONFIG_KEY, streamId, key), value)); return Collections.unmodifiableMap(configs); } }
public Map<String, String> toConfig() { HashMap<String, String> configs = new HashMap<>(); configs.put(String.format(SYSTEM_CONFIG_KEY, streamId), getSystemName()); this.physicalNameOptional.ifPresent(physicalName -> configs.put(String.format(PHYSICAL_NAME_CONFIG_KEY, streamId), physicalName)); this.streamConfigs.forEach((key, value) -> configs.put(String.format(STREAM_CONFIGS_CONFIG_KEY, streamId, key), value)); return Collections.unmodifiableMap(configs); } }