Unbounded ordering log record queueing strategy. More...
#include <unbounded_ordering_queue.hpp>
Public Member Functions | |
posix_time::time_duration | get_ordering_window () const |
Returns ordering window size specified during initialization. More... | |
Static Public Member Functions | |
static posix_time::time_duration | get_default_ordering_window () |
Returns default ordering window size. More... | |
Protected Member Functions | |
template<typename ArgsT > | |
unbounded_ordering_queue (ArgsT const &args) | |
Initializing constructor. More... | |
void | enqueue (record_view const &rec) |
Enqueues log record to the queue. More... | |
bool | try_enqueue (record_view const &rec) |
Attempts to enqueue log record to the queue. More... | |
bool | try_dequeue_ready (record_view &rec) |
Attempts to dequeue a log record ready for processing from the queue, does not block if no log records are ready to be processed. More... | |
bool | try_dequeue (record_view &rec) |
Attempts to dequeue log record from the queue, does not block. More... | |
bool | dequeue_ready (record_view &rec) |
Dequeues log record from the queue, blocks if no log records are ready to be processed. More... | |
void | interrupt_dequeue () |
Wakes a thread possibly blocked in the dequeue method. More... | |
Unbounded ordering log record queueing strategy.
The unbounded_ordering_queue
class is intended to be used with the asynchronous_sink
frontend as a log record queueing strategy.
This strategy provides the following properties to the record queueing mechanism:
OrderT
template parameter.Since this queue has no size limits, it may grow uncontrollably if sink backends dequeue log records not fast enough. When this is an issue, it is recommended to use one of the bounded strategies.
|
inlineexplicitprotected |
Initializing constructor.
|
inlineprotected |
Dequeues log record from the queue, blocks if no log records are ready to be processed.
References boost::geometry::difference(), boost::lock(), and boost::condition_variable::wait().
|
inlineprotected |
Enqueues log record to the queue.
References boost::lock().
|
inlinestatic |
Returns default ordering window size.
The default window size is specific to the operating system thread scheduling mechanism.
|
inline |
Returns ordering window size specified during initialization.
|
inlineprotected |
Wakes a thread possibly blocked in the dequeue
method.
References boost::lock(), and boost::condition_variable::notify_one().
|
inlineprotected |
Attempts to dequeue log record from the queue, does not block.
References boost::lock().
|
inlineprotected |
Attempts to dequeue a log record ready for processing from the queue, does not block if no log records are ready to be processed.
References boost::lock().
|
inlineprotected |
Attempts to enqueue log record to the queue.
References boost::lock(), boost::unique_lock< Mutex >::owns_lock(), and boost::try_to_lock.