AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT > Class Template Reference

#include <AWSClientAsyncCRTP.h>

Public Member Functions

 
 
 
 
template<typename RequestT , typename HandlerT , typename OperationFuncT , typename std::enable_if<!IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
void SubmitAsync (OperationFuncT operationFunc, const RequestT &request, const HandlerT &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
 
template<typename RequestT , typename HandlerT , typename OperationFuncT , typename std::enable_if< IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
void SubmitAsync (OperationFuncT operationFunc, RequestT &request, const HandlerT &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
 
template<typename HandlerT , typename OperationFuncT >
void SubmitAsync (OperationFuncT operationFunc, const HandlerT &handler, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &context=nullptr) const
 
template<typename RequestT , typename OperationFuncT , typename std::enable_if<!IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
auto SubmitCallable (OperationFuncT operationFunc, const RequestT &request) const -> std::future< decltype((static_cast< const AwsServiceClientT * >(nullptr) -> *operationFunc)(request))>
 
template<typename RequestT , typename OperationFuncT , typename std::enable_if< IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
auto SubmitCallable (OperationFuncT operationFunc, RequestT &request) const -> std::future< decltype((static_cast< const AwsServiceClientT * >(nullptr) -> *operationFunc)(request))>
 
template<typename OperationFuncT >
auto SubmitCallable (OperationFuncT operationFunc) const -> std::future< decltype((static_cast< const AwsServiceClientT * >(nullptr) -> *operationFunc)())>
 

Static Public Member Functions

static void ShutdownSdkClient (void *pThis, int64_t timeoutMs=-1)
 

Protected Attributes

std::atomic< bool > m_isInitialized
 
std::atomic< size_t > m_operationsProcessed
 
std::condition_variable m_shutdownSignal
 
std::mutex m_shutdownMutex
 

Friends

template<typename OutcomeT , typename ClientT , typename AWSEndpointT , typename RequestT , typename HandlerT >
 

Detailed Description

template<typename AwsServiceClientT>
class Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >

A CRTP-base class template that is used to add template methods to call AWS Operations in parallel using ThreadExecutor An Aws<Service>Client is going to inherit from this class and will get methods below available.

Definition at line 44 of file AWSClientAsyncCRTP.h.

Constructor & Destructor Documentation

◆ ClientWithAsyncTemplateMethods() [1/2]

template<typename AwsServiceClientT >
Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::ClientWithAsyncTemplateMethods ( )
inline

Definition at line 47 of file AWSClientAsyncCRTP.h.

◆ ClientWithAsyncTemplateMethods() [2/2]

template<typename AwsServiceClientT >
Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::ClientWithAsyncTemplateMethods ( const ClientWithAsyncTemplateMethods< AwsServiceClientT > &  other)
inline

Definition at line 58 of file AWSClientAsyncCRTP.h.

◆ ~ClientWithAsyncTemplateMethods()

template<typename AwsServiceClientT >
inlinevirtual

Definition at line 80 of file AWSClientAsyncCRTP.h.

Member Function Documentation

◆ operator=()

template<typename AwsServiceClientT >
ClientWithAsyncTemplateMethods & Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::operator= ( const ClientWithAsyncTemplateMethods< AwsServiceClientT > &  other)
inline

Definition at line 68 of file AWSClientAsyncCRTP.h.

◆ ShutdownSdkClient()

template<typename AwsServiceClientT >
static void Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::ShutdownSdkClient ( void *  pThis,
int64_t  timeoutMs = -1 
)
inlinestatic

A callback static method to terminate client (i.e. to free dynamic resources and prevent further processing)

Parameters
pThis,avoid* pointer that points to AWS SDK Service Client, such as "Aws::S3::S3Client"
timeoutMs,atimeout (in ms) that this method will wait for currently running operations to complete. "-1" represents "use clientConfiguration.requestTimeoutMs" value.

Definition at line 92 of file AWSClientAsyncCRTP.h.

◆ SubmitAsync() [1/3]

template<typename AwsServiceClientT >
template<typename HandlerT , typename OperationFuncT >
void Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::SubmitAsync ( OperationFuncT  operationFunc,
const HandlerT &  handler,
const std::shared_ptr< const Aws::Client::AsyncCallerContext > &  context = nullptr 
) const
inline

A template to submit a AwsServiceClient regular operation method without arguments for async execution. This template method submits a task into a thread executor and triggers associated callback when operation has finished.

Definition at line 162 of file AWSClientAsyncCRTP.h.

◆ SubmitAsync() [2/3]

template<typename AwsServiceClientT >
template<typename RequestT , typename HandlerT , typename OperationFuncT , typename std::enable_if<!IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
void Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::SubmitAsync ( OperationFuncT  operationFunc,
const RequestT &  request,
const HandlerT &  handler,
const std::shared_ptr< const Aws::Client::AsyncCallerContext > &  context = nullptr 
) const
inline

A template to submit a AwsServiceClient regular operation method for async execution. This template method copies and queues the request into a thread executor and triggers associated callback when operation has finished.

Definition at line 133 of file AWSClientAsyncCRTP.h.

◆ SubmitAsync() [3/3]

template<typename AwsServiceClientT >
template<typename RequestT , typename HandlerT , typename OperationFuncT , typename std::enable_if< IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
void Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::SubmitAsync ( OperationFuncT  operationFunc,
RequestT &  request,
const HandlerT &  handler,
const std::shared_ptr< const Aws::Client::AsyncCallerContext > &  context = nullptr 
) const
inline

A template to submit a AwsServiceClient event stream enabled operation method for async execution. This template method queues the original request object into a thread executor and triggers associated callback when operation has finished. It is caller's responsibility to ensure the lifetime of the original request object for a duration of the async execution.

Definition at line 148 of file AWSClientAsyncCRTP.h.

◆ SubmitCallable() [1/3]

template<typename AwsServiceClientT >
template<typename OperationFuncT >
auto Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::SubmitCallable ( OperationFuncT  operationFunc) const -> std::future<decltype((static_cast<const AwsServiceClientT*>(nullptr)->*operationFunc)())>
inline

A template to submit a AwsServiceClient regular operation without request argument for an async execution that returns a future<OperationOutcome> object. This template method copies and queues the request into a thread executor and returns a future<OperationOutcome> object when operation has finished.

Definition at line 202 of file AWSClientAsyncCRTP.h.

◆ SubmitCallable() [2/3]

template<typename AwsServiceClientT >
template<typename RequestT , typename OperationFuncT , typename std::enable_if<!IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
auto Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::SubmitCallable ( OperationFuncT  operationFunc,
const RequestT &  request 
) const -> std::future<decltype((static_cast<const AwsServiceClientT*>(nullptr)->*operationFunc)(request))>
inline

A template to submit a AwsServiceClient regular operation method for async execution that returns a future<OperationOutcome> object. This template method copies and queues the request into a thread executor and returns a future<OperationOutcome> object when operation has finished.

Definition at line 175 of file AWSClientAsyncCRTP.h.

◆ SubmitCallable() [3/3]

template<typename AwsServiceClientT >
template<typename RequestT , typename OperationFuncT , typename std::enable_if< IsEventStreamOperation< OperationFuncT >::value, int >::type = 0>
auto Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::SubmitCallable ( OperationFuncT  operationFunc,
RequestT &  request 
) const -> std::future<decltype((static_cast<const AwsServiceClientT*>(nullptr)->*operationFunc)(request))>
inline

A template to submit a AwsServiceClient event stream enabled operation method for async execution that returns a future<OperationOutcome> object. This template method queues the original request into a thread executor and returns a future<OperationOutcome> object when operation has finished. It is caller's responsibility to ensure the lifetime of the original request object for a duration of the async execution.

Definition at line 189 of file AWSClientAsyncCRTP.h.

Friends And Related Symbol Documentation

◆ BidirectionalEventStreamingTask

template<typename AwsServiceClientT >
template<typename OutcomeT , typename ClientT , typename AWSEndpointT , typename RequestT , typename HandlerT >
friend

Definition at line 210 of file AWSClientAsyncCRTP.h.

Member Data Documentation

◆ m_isInitialized

template<typename AwsServiceClientT >
std::atomic<bool> Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::m_isInitialized
protected

Definition at line 212 of file AWSClientAsyncCRTP.h.

◆ m_operationsProcessed

template<typename AwsServiceClientT >
std::atomic<size_t> Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::m_operationsProcessed
mutableprotected

Definition at line 213 of file AWSClientAsyncCRTP.h.

◆ m_shutdownMutex

template<typename AwsServiceClientT >
std::mutex Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::m_shutdownMutex
mutableprotected

Definition at line 215 of file AWSClientAsyncCRTP.h.

◆ m_shutdownSignal

template<typename AwsServiceClientT >
std::condition_variable Aws::Client::ClientWithAsyncTemplateMethods< AwsServiceClientT >::m_shutdownSignal
mutableprotected

Definition at line 214 of file AWSClientAsyncCRTP.h.


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