MCPcopy Create free account
hub / github.com/apple/foundationdb / get

Method get

fdbclient/DatabaseConfiguration.cpp:691–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691Optional<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
705bool DatabaseConfiguration::isExcludedServer(NetworkAddressList a) const {
706 return get(encodeExcludedServersKey(AddressExclusion(a.address.ip, a.address.port))).present() ||

Callers

nothing calls this directly

Calls 7

ValueRefClass · 0.85
lower_boundFunction · 0.70
getMethod · 0.65
presentMethod · 0.45
findMethod · 0.45
toStringMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected