Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::sinks::block_on_overflow Class Reference

Blocking strategy for handling log record queue overflows. More...

#include <block_on_overflow.hpp>

Public Member Functions

template<typename LockT >
bool on_overflow (record_view const &, LockT &lock)
 Default constructor. More...
 
void on_queue_space_available ()
 This method is called by the queue when there appears a free space. More...
 
void interrupt ()
 This method is called by the queue to interrupt any possible waits in on_overflow. More...
 

Detailed Description

Blocking strategy for handling log record queue overflows.

This strategy will cause enqueueing threads to block when the log record queue overflows. The blocked threads will be woken as soon as there appears free space in the queue, in the same order they attempted to enqueue records.

Member Function Documentation

void boost::sinks::block_on_overflow::interrupt ( )
inline

This method is called by the queue to interrupt any possible waits in on_overflow.

The internal lock protecting the queue is locked when calling this method.

References boost::phoenix::context().

template<typename LockT >
bool boost::sinks::block_on_overflow::on_overflow ( record_view const &  ,
LockT &  lock 
)
inline

Default constructor.

This method is called by the queue when overflow is detected.

Parameters
lockAn internal lock that protects the queue
Return values
trueAttempt to enqueue the record again.
falseDiscard the record.

References boost::phoenix::context().

void boost::sinks::block_on_overflow::on_queue_space_available ( )
inline

This method is called by the queue when there appears a free space.

The internal lock protecting the queue is locked when calling this method.


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