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

Method Lookup

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

Source from the content-addressed store, hash-verified

1031class EndpointProviderCache {
1032 public:
1033 std::shared_ptr<Aws::S3::S3EndpointProviderBase> Lookup(
1034 const Aws::S3::S3ClientConfiguration& config) {
1035 auto key = EndpointConfigKey(config);
1036 CacheValue* value;
1037 {
1038 std::unique_lock lock(mutex_);
1039 value = &cache_[std::move(key)];
1040 }
1041 std::call_once(value->once, [&]() {
1042 auto endpoint_provider = std::make_shared<Aws::S3::S3EndpointProvider>();
1043 endpoint_provider->InitBuiltInParameters(config);
1044 value->endpoint_provider =
1045 std::make_shared<InitOnceEndpointProvider>(std::move(endpoint_provider));
1046 });
1047 return value->endpoint_provider;
1048 }
1049
1050 void Reset() {
1051 std::unique_lock lock(mutex_);

Callers 1

BuildClientMethod · 0.45

Calls 2

EndpointConfigKeyClass · 0.85
InitBuiltInParametersMethod · 0.80

Tested by

no test coverage detected