Public Member Functions | Private Types | Private Attributes | List of all members
Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator > Class Template Reference

#include <observed_queue.h>

Inheritance diagram for Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >:
Inheritance graph
[legend]

Public Member Functions

void clear () override
 
bool dequeue (T &data, const std::chrono::microseconds &duration) override
 
bool empty () const override
 
bool enqueue (T &&value) override
 
bool enqueue (T &value) override
 
size_t size () const override
 
bool tryEnqueue (T &value, const std::chrono::microseconds &duration) override
 
bool tryEnqueue (T &&value, const std::chrono::microseconds &duration) override
 
 ~ObservedSynchronizedQueue () override=default
 
- Public Member Functions inherited from Aws::DataFlow::ObservedQueue< T, Allocator >
void setStatusMonitor (std::shared_ptr< StatusMonitor > status_monitor) override
 
 ~ObservedQueue () override=default
 
- Public Member Functions inherited from Aws::DataFlow::Source< T >
virtual ~Source ()=default
 

Private Types

using DequeueMutex = std::timed_mutex
 
using OQ = ObservedQueue< T, Allocator >
 

Private Attributes

DequeueMutex dequeue_mutex_
 

Additional Inherited Members

- Protected Member Functions inherited from Aws::DataFlow::ObservedQueue< T, Allocator >
void notifyMonitor (const Status &status)
 
- Protected Attributes inherited from Aws::DataFlow::ObservedQueue< T, Allocator >
std::deque< T, Allocator > dequeue_
 
std::shared_ptr< StatusMonitorstatus_monitor_
 

Detailed Description

template<class T, class Allocator = std::allocator<T>>
class Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >

Adds basic thread safety to the ObservedQueue.

Template Parameters
T
Allocator

Definition at line 179 of file observed_queue.h.

Member Typedef Documentation

template<class T, class Allocator = std::allocator<T>>
using Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::DequeueMutex = std::timed_mutex
private

Definition at line 271 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
using Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::OQ = ObservedQueue<T, Allocator>
private

Definition at line 269 of file observed_queue.h.

Constructor & Destructor Documentation

template<class T, class Allocator = std::allocator<T>>
Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::~ObservedSynchronizedQueue ( )
overridedefault

Member Function Documentation

template<class T, class Allocator = std::allocator<T>>
void Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::clear ( )
inlineoverridevirtual

Clear the dequeue

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 263 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
bool Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::dequeue ( T &  data,
const std::chrono::microseconds &  duration 
)
inlineoverridevirtual

Dequeue data and notify the observer of data unavailable if the queue is empty.

Returns
the front of the dequeue

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 232 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
bool Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::empty ( ) const
inlineoverridevirtual
Returns
true if the queue is empty

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 247 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
bool Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::enqueue ( T &&  value)
inlineoverridevirtual

Enqueue data and notify the observer of data available.

Parameters
valueto enqueue

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 188 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
bool Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::enqueue ( T &  value)
inlineoverridevirtual

Enqueue data and notify the observer of data available.

Parameters
valueto enqueue

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 198 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
size_t Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::size ( ) const
inlineoverridevirtual
Returns
the size of the queue

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 255 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
bool Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::tryEnqueue ( T &  value,
const std::chrono::microseconds &  duration 
)
inlineoverridevirtual

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 203 of file observed_queue.h.

template<class T, class Allocator = std::allocator<T>>
bool Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::tryEnqueue ( T &&  value,
const std::chrono::microseconds &  duration 
)
inlineoverridevirtual

Reimplemented from Aws::DataFlow::ObservedQueue< T, Allocator >.

Definition at line 215 of file observed_queue.h.

Member Data Documentation

template<class T, class Allocator = std::allocator<T>>
DequeueMutex Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >::dequeue_mutex_
mutableprivate

Definition at line 272 of file observed_queue.h.


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


dataflow_lite
Author(s): AWS RoboMaker
autogenerated on Fri May 7 2021 02:18:22