AWS Encryption SDK for C v2.4
Loading...
Searching...
No Matches
Aws::Cryptosdk::KmsKeyring::CachingClientSupplier Class Reference

#include <kms_keyring.h>

+ Inheritance diagram for Aws::Cryptosdk::KmsKeyring::CachingClientSupplier:
+ Collaboration diagram for Aws::Cryptosdk::KmsKeyring::CachingClientSupplier:

Public Member Functions

std::shared_ptr< KMS::KMSClient > GetClient (const Aws::String &region, std::function< void()> &report_success)
 
- Public Member Functions inherited from Aws::Cryptosdk::KmsKeyring::ClientSupplier
virtual ~ClientSupplier ()
 

Static Public Member Functions

static std::shared_ptr< CachingClientSupplierCreate ()
 

Protected Attributes

std::mutex cache_mutex
 
Aws::Map< Aws::String, std::shared_ptr< Aws::KMS::KMSClient > > cache
 

Detailed Description

Definition at line 196 of file kms_keyring.h.

Member Function Documentation

◆ Create()

static std::shared_ptr< CachingClientSupplier > Aws::Cryptosdk::KmsKeyring::CachingClientSupplier::Create ( )
static

Helper function which creates a new CachingClientSupplier and returns a shared pointer to it.

◆ GetClient()

std::shared_ptr< KMS::KMSClient > Aws::Cryptosdk::KmsKeyring::CachingClientSupplier::GetClient ( const Aws::String & region,
std::function< void()> & report_success )
virtual

If

Parameters
regionis the empty string, then returns a KMS client in the SDK's default region. If a client is already cached for this region, returns that one and provides a no-op callable. If a client is not already cached for this region, returns a KMS client with default settings and provides a callable which will cache the client. Never returns nullptr.

Implements Aws::Cryptosdk::KmsKeyring::ClientSupplier.

Field Documentation

◆ cache

Aws::Map<Aws::String, std::shared_ptr<Aws::KMS::KMSClient> > Aws::Cryptosdk::KmsKeyring::CachingClientSupplier::cache
protected

Region -> KMS Client.

Definition at line 216 of file kms_keyring.h.

◆ cache_mutex

std::mutex Aws::Cryptosdk::KmsKeyring::CachingClientSupplier::cache_mutex
mutableprotected

Definition at line 212 of file kms_keyring.h.


The documentation for this class was generated from the following file: