ConcurrentQueue policy to throw an exception when the queue is full. More...
#include <artdaq-core/Core/ConcurrentQueue.hh>
Classes | |
struct | QueueIsFull |
Exception thrown by FailIfFull policy when an enqueue operation is attempted on a full queue. More... | |
Public Types | |
typedef bool | ReturnType |
Type returned by doEnq. | |
typedef T | ValueType |
Type of values stored in queue. | |
typedef std::list< T > | SequenceType |
Type of seqeuences of values. | |
typedef SequenceType::size_type | SizeType |
Size type of seqeuences. | |
Static Public Member Functions | |
static void | doInsert (T const &item, SequenceType &elements, SizeType &size, detail::MemoryType const &itemSize, detail::MemoryType &used, std::condition_variable &nonempty) |
Inserts element into the ConcurrentQueue. | |
static ReturnType | doEnq (T const &item, SequenceType &elements, SizeType &size, SizeType &capacity, detail::MemoryType &used, detail::MemoryType &memory, size_t &elementsDropped, std::condition_variable &nonempty) |
Attempts to enqueue an item. | |
Static Public Attributes | |
artdaq::FailIfFull::QueueIsFull | queueIsFull |
Exception thrown by FailIfFull policy when an enqueue operation is attempted on a full queue. |
ConcurrentQueue policy to throw an exception when the queue is full.
T | Type of element to store in queue |
Definition at line 161 of file ConcurrentQueue.hh.
static ReturnType artdaq::FailIfFull< T >::doEnq | ( | T const & | item, | |
SequenceType & | elements, | |||
SizeType & | size, | |||
SizeType & | capacity, | |||
detail::MemoryType & | used, | |||
detail::MemoryType & | memory, | |||
size_t & | elementsDropped, | |||
std::condition_variable & | nonempty | |||
) | [inline, static] |
Attempts to enqueue an item.
item | Item to enqueue | |
elements | The ConcurrentQueue data | |
size | Number of elements in the ConcurrentQueue | |
capacity | Maximum number of elements in the ConcurrentQueue | |
used | Memory used by the ConcurrentQueue elements | |
memory | Amount of memory available for use by the ConcurrentQueue | |
elementsDropped | Number of failed insert operations | |
nonempty | Condition variable to notify readers of new data on the queue |
queueIsFull | if the queue is full |
Definition at line 223 of file ConcurrentQueue.hh.
static void artdaq::FailIfFull< T >::doInsert | ( | T const & | item, | |
SequenceType & | elements, | |||
SizeType & | size, | |||
detail::MemoryType const & | itemSize, | |||
detail::MemoryType & | used, | |||
std::condition_variable & | nonempty | |||
) | [inline, static] |
Inserts element into the ConcurrentQueue.
item | Item to insert | |
elements | The ConcurrentQueue data | |
size | Number of elements in the ConcurrentQueue | |
itemSize | Size of the newly-inserted element | |
used | Memory used by the ConcurrentQueue elements | |
nonempty | Condition variable to notify readers of new data on queue |
Definition at line 194 of file ConcurrentQueue.hh.
artdaq::FailIfFull::QueueIsFull artdaq::FailIfFull< T >::queueIsFull [static] |
Exception thrown by FailIfFull policy when an enqueue operation is attempted on a full queue.
Instance of QueueIsFull exception