MCPcopy Create free account
hub / github.com/apache/arrow / Lookup

Method Lookup

cpp/src/arrow/filesystem/s3fs.cc:1093–1108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1091class EndpointProviderCache {
1092 public:
1093 std::shared_ptr<Aws::S3::S3EndpointProviderBase> Lookup(
1094 const Aws::S3::S3ClientConfiguration& config) {
1095 auto key = EndpointConfigKey(config);
1096 CacheValue* value;
1097 {
1098 std::unique_lock lock(mutex_);
1099 value = &cache_[std::move(key)];
1100 }
1101 std::call_once(value->once, [&]() {
1102 auto endpoint_provider = std::make_shared<Aws::S3::S3EndpointProvider>();
1103 endpoint_provider->InitBuiltInParameters(config);
1104 value->endpoint_provider =
1105 std::make_shared<InitOnceEndpointProvider>(std::move(endpoint_provider));
1106 });
1107 return value->endpoint_provider;
1108 }
1109
1110 void Reset() {
1111 std::unique_lock lock(mutex_);

Callers 1

BuildClientMethod · 0.45

Calls 2

EndpointConfigKeyClass · 0.85
InitBuiltInParametersMethod · 0.80

Tested by

no test coverage detected