AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Aws::Queues::Queue< MESSAGE_TYPE > Class Template Referenceabstract

#include <Queue.h>

Public Member Functions

 
 
 
 
 
 
 
 
void SetMessageDeleteFailedEventHandler (const MessageDeleteFailedEventHandler &messageHandler)
 
void SetMessageDeleteSuccessEventHandler (const MessageDeleteSuccessEventHandler &messageHandler)
 
void SetMessageSendFailedEventHandler (const MessageSendFailedEventHandler &messageHandler)
 
void SetMessageSendSuccessEventHandler (const MessageSendSuccessEventHandler &messageHandler)
 
void SetMessageReceivedEventHandler (MessageReceivedEventHandler &&messageHandler)
 
void SetMessageDeleteFailedEventHandler (MessageDeleteFailedEventHandler &&messageHandler)
 
void SetMessageDeleteSuccessEventHandler (MessageDeleteSuccessEventHandler &&messageHandler)
 
void SetMessageSendFailedEventHandler (MessageSendFailedEventHandler &&messageHandler)
 
void SetMessageSendSuccessEventHandler (MessageSendSuccessEventHandler &&messageHandler)
 
const MessageReceivedEventHandler & GetMessageReceivedEventHandler () const
 
const MessageDeleteFailedEventHandler & GetMessageDeleteFailedEventHandler () const
 
const MessageDeleteSuccessEventHandler & GetMessageDeleteSuccessEventHandler () const
 
const MessageSendFailedEventHandler & GetMessageSendFailedEventHandler () const
 
const MessageSendSuccessEventHandler & GetMessageSendSuccessEventHandler () const
 

Protected Attributes

std::atomic< boolm_continue
 

Detailed Description

template<typename MESSAGE_TYPE>
class Aws::Queues::Queue< MESSAGE_TYPE >

Simple queue class. Allows standard queue operations top, delete, and push. Also has higher level, asynchronous interface with callbacks.

Definition at line 24 of file Queue.h.

Constructor & Destructor Documentation

◆ Queue()

template<typename MESSAGE_TYPE >
Aws::Queues::Queue< MESSAGE_TYPE >::Queue ( unsigned  pollingFrequency)
inline

You are responsible for calling StartPolling() if you intend to use the asynchronous pattern.

the value of pollingFrequency is how long to wait between queue polls. If the queue poll exceeds this limit then the next poll will start immediately upon completion of the existing poll, this value is useful only if you intend to use this instance for the asynchronous polling model.

Definition at line 39 of file Queue.h.

◆ ~Queue()

Definition at line 44 of file Queue.h.

Member Function Documentation

◆ Delete()

template<typename MESSAGE_TYPE >
pure virtual

Implemented in Aws::Queues::Sqs::SQSQueue.

◆ GetMessageDeleteFailedEventHandler()

template<typename MESSAGE_TYPE >
const MessageDeleteFailedEventHandler & Aws::Queues::Queue< MESSAGE_TYPE >::GetMessageDeleteFailedEventHandler ( ) const
inline

Definition at line 96 of file Queue.h.

◆ GetMessageDeleteSuccessEventHandler()

template<typename MESSAGE_TYPE >
const MessageDeleteSuccessEventHandler & Aws::Queues::Queue< MESSAGE_TYPE >::GetMessageDeleteSuccessEventHandler ( ) const
inline

Definition at line 97 of file Queue.h.

◆ GetMessageReceivedEventHandler()

template<typename MESSAGE_TYPE >
const MessageReceivedEventHandler & Aws::Queues::Queue< MESSAGE_TYPE >::GetMessageReceivedEventHandler ( ) const
inline

Definition at line 95 of file Queue.h.

◆ GetMessageSendFailedEventHandler()

template<typename MESSAGE_TYPE >
const MessageSendFailedEventHandler & Aws::Queues::Queue< MESSAGE_TYPE >::GetMessageSendFailedEventHandler ( ) const
inline

Definition at line 98 of file Queue.h.

◆ GetMessageSendSuccessEventHandler()

template<typename MESSAGE_TYPE >
const MessageSendSuccessEventHandler & Aws::Queues::Queue< MESSAGE_TYPE >::GetMessageSendSuccessEventHandler ( ) const
inline

Definition at line 99 of file Queue.h.

◆ Push()

Implemented in Aws::Queues::Sqs::SQSQueue.

◆ SetMessageDeleteFailedEventHandler() [1/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageDeleteFailedEventHandler ( const MessageDeleteFailedEventHandler &  messageHandler)
inline

Definition at line 84 of file Queue.h.

◆ SetMessageDeleteFailedEventHandler() [2/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageDeleteFailedEventHandler ( MessageDeleteFailedEventHandler &&  messageHandler)
inline

Definition at line 90 of file Queue.h.

◆ SetMessageDeleteSuccessEventHandler() [1/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageDeleteSuccessEventHandler ( const MessageDeleteSuccessEventHandler &  messageHandler)
inline

Definition at line 85 of file Queue.h.

◆ SetMessageDeleteSuccessEventHandler() [2/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageDeleteSuccessEventHandler ( MessageDeleteSuccessEventHandler &&  messageHandler)
inline

Definition at line 91 of file Queue.h.

◆ SetMessageReceivedEventHandler() [1/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageReceivedEventHandler ( const MessageReceivedEventHandler &  messageHandler)
inline

Definition at line 83 of file Queue.h.

◆ SetMessageReceivedEventHandler() [2/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageReceivedEventHandler ( MessageReceivedEventHandler &&  messageHandler)
inline

Definition at line 89 of file Queue.h.

◆ SetMessageSendFailedEventHandler() [1/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageSendFailedEventHandler ( const MessageSendFailedEventHandler &  messageHandler)
inline

Definition at line 86 of file Queue.h.

◆ SetMessageSendFailedEventHandler() [2/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageSendFailedEventHandler ( MessageSendFailedEventHandler &&  messageHandler)
inline

Definition at line 92 of file Queue.h.

◆ SetMessageSendSuccessEventHandler() [1/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageSendSuccessEventHandler ( const MessageSendSuccessEventHandler &  messageHandler)
inline

Definition at line 87 of file Queue.h.

◆ SetMessageSendSuccessEventHandler() [2/2]

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::SetMessageSendSuccessEventHandler ( MessageSendSuccessEventHandler &&  messageHandler)
inline

Definition at line 93 of file Queue.h.

◆ StartPolling()

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::StartPolling ( )
inline

Starts a polling thread in the background. You will need to register OnMessageReceived to receive the messages. This method can be called after StopPolling to resume polling after being paused.

Definition at line 58 of file Queue.h.

◆ StopPolling()

template<typename MESSAGE_TYPE >
void Aws::Queues::Queue< MESSAGE_TYPE >::StopPolling ( )
inline

Stops the polling thread. Messages in transit will be handled before termination of the thread. Will be called by the destructor so only call this if you want control over when the thread exits. This method blocks waiting on the polling thread to stop. After being called, the StartPolling() method can be called, and the thread will resume.

Definition at line 73 of file Queue.h.

◆ Top()

template<typename MESSAGE_TYPE >
pure virtual

Implemented in Aws::Queues::Sqs::SQSQueue.

Member Data Documentation

◆ m_continue

template<typename MESSAGE_TYPE >
std::atomic<bool> Aws::Queues::Queue< MESSAGE_TYPE >::m_continue
protected

Definition at line 102 of file Queue.h.


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