#include <observed_queue.h>
Public Member Functions | |
void | clear () override |
bool | dequeue (T &data, const std::chrono::microseconds &) override |
bool | empty () const override |
bool | enqueue (T &&value) override |
bool | enqueue (T &value) override |
void | setStatusMonitor (std::shared_ptr< StatusMonitor > status_monitor) override |
size_t | size () const override |
bool | tryEnqueue (T &value, const std::chrono::microseconds &) override |
bool | tryEnqueue (T &&value, const std::chrono::microseconds &) override |
~ObservedQueue () override=default | |
Public Member Functions inherited from Aws::DataFlow::Source< T > | |
virtual | ~Source ()=default |
Protected Member Functions | |
void | notifyMonitor (const Status &status) |
Protected Attributes | |
std::deque< T, Allocator > | dequeue_ |
std::shared_ptr< StatusMonitor > | status_monitor_ |
An observed queue is a dequeue wrapper which notifies an observer when a task is added.
T | type of data |
Allocator |
Definition at line 52 of file observed_queue.h.
|
overridedefault |
|
inlineoverridevirtual |
Clear the dequeue
Implements Aws::DataFlow::Sink< T >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 141 of file observed_queue.h.
|
inlineoverridevirtual |
Dequeue data and notify the observer of data unavailable if the queue is empty.
Implements Aws::DataFlow::Source< T >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 108 of file observed_queue.h.
|
inlineoverridevirtual |
Implements Aws::DataFlow::IObservedQueue< T, Allocator >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 127 of file observed_queue.h.
|
inlineoverridevirtual |
Enqueue data and notify the observer of data available.
value | to enqueue |
Implements Aws::DataFlow::Sink< T >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 72 of file observed_queue.h.
|
inlineoverridevirtual |
Enqueue data and notify the observer of data available.
value | to enqueue |
Implements Aws::DataFlow::Sink< T >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 83 of file observed_queue.h.
|
inlineprotected |
Notify the monitor if it exists.
status | the status to notify the monitor of. |
Definition at line 152 of file observed_queue.h.
|
inlineoverridevirtual |
Set the observer for the queue.
status_monitor |
Implements Aws::DataFlow::IObservedQueue< T, Allocator >.
Definition at line 63 of file observed_queue.h.
|
inlineoverridevirtual |
Implements Aws::DataFlow::IObservedQueue< T, Allocator >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 134 of file observed_queue.h.
|
inlineoverridevirtual |
Implements Aws::DataFlow::Sink< T >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 89 of file observed_queue.h.
|
inlineoverridevirtual |
Implements Aws::DataFlow::Sink< T >.
Reimplemented in Aws::DataFlow::ObservedBlockingQueue< T, Allocator >, and Aws::DataFlow::ObservedSynchronizedQueue< T, Allocator >.
Definition at line 96 of file observed_queue.h.
|
protected |
The dequeue to store data.
Definition at line 166 of file observed_queue.h.
|
protected |
The status monitor observer.
Definition at line 161 of file observed_queue.h.