| 689 | } |
| 690 | |
| 691 | Optional<ValueRef> DatabaseConfiguration::get(KeyRef key) const { |
| 692 | if (mutableConfiguration.present()) { |
| 693 | auto i = mutableConfiguration.get().find(key.toString()); |
| 694 | if (i == mutableConfiguration.get().end()) |
| 695 | return Optional<ValueRef>(); |
| 696 | return ValueRef(i->second); |
| 697 | } else { |
| 698 | auto i = lower_bound(rawConfiguration, key); |
| 699 | if (i == rawConfiguration.end() || i->key != key) |
| 700 | return Optional<ValueRef>(); |
| 701 | return i->value; |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | bool DatabaseConfiguration::isExcludedServer(NetworkAddressList a) const { |
| 706 | return get(encodeExcludedServersKey(AddressExclusion(a.address.ip, a.address.port))).present() || |