| 797 | } |
| 798 | |
| 799 | void DatabaseConfiguration::makeConfigurationImmutable() { |
| 800 | if (!mutableConfiguration.present()) |
| 801 | return; |
| 802 | auto& mc = mutableConfiguration.get(); |
| 803 | rawConfiguration = Standalone<VectorRef<KeyValueRef>>(); |
| 804 | rawConfiguration.resize(rawConfiguration.arena(), mc.size()); |
| 805 | int i = 0; |
| 806 | for (auto r = mc.begin(); r != mc.end(); ++r) |
| 807 | rawConfiguration[i++] = KeyValueRef(rawConfiguration.arena(), KeyValueRef(r->first, r->second)); |
| 808 | mutableConfiguration = Optional<std::map<std::string, std::string>>(); |
| 809 | } |
| 810 | |
| 811 | void DatabaseConfiguration::fromKeyValues(Standalone<VectorRef<KeyValueRef>> rawConfig) { |
| 812 | resetInternal(); |