|
join 1.0
lightweight network framework library
|
queue base class. More...
#include <queue.hpp>
Public Types | |
| using | ValueType = Type |
| using | Slot |
| using | Segment = QueueSegment<Type, Slot> |
Public Member Functions | |
| template<typename... Args> | |
| BasicQueue (uint64_t capacity, Args &&... args) | |
| create instance. | |
| BasicQueue (const BasicQueue &other)=delete | |
| copy constructor. | |
| BasicQueue & | operator= (const BasicQueue &other)=delete |
| copy assignment operator. | |
| BasicQueue (BasicQueue &&other)=delete | |
| move constructor. | |
| BasicQueue & | operator= (BasicQueue &&other)=delete |
| move assignment operator. | |
| ~BasicQueue () noexcept=default | |
| destroy queue instance. | |
| int | tryPush (const Type &element) noexcept |
| try to push element into ring buffer. | |
| ssize_t | tryPush (const Type *elements, size_t size) noexcept |
| try to push multiple elements into the ring buffer. | |
| int | push (const Type &element) noexcept |
| push element into the ring buffer. | |
| int | push (const Type *elements, size_t size) noexcept |
| push multiple elements into the ring buffer. | |
| int | tryPop (Type &element) noexcept |
| try to pop element from the ring buffer. | |
| ssize_t | tryPop (Type *elements, size_t size) noexcept |
| try to pop multiple elements from the ring buffer. | |
| int | pop (Type &element) noexcept |
| pop element from the ring buffer. | |
| int | pop (Type *elements, size_t size) noexcept |
| pop multiple elements from the ring buffer. | |
| uint64_t | pending () const noexcept |
| get the number of pending elements for reading. | |
| uint64_t | available () const noexcept |
| get the number of available slots for writing. | |
| bool | full () const noexcept |
| check if the ring buffer is full. | |
| bool | empty () const noexcept |
| check if the ring buffer is empty. | |
| int | mlock () const noexcept |
| lock memory in RAM. | |
queue base class.
| using join::BasicQueue< Type, Backend, SyncPolicy >::Segment = QueueSegment<Type, Slot> |
| using join::BasicQueue< Type, Backend, SyncPolicy >::Slot |
| using join::BasicQueue< Type, Backend, SyncPolicy >::ValueType = Type |
|
inlineexplicit |
create instance.
| capacity | queue capacity. |
| args | backend args. |
|
delete |
copy constructor.
| other | other object to copy. |
|
delete |
move constructor.
| other | other object to move. |
|
defaultnoexcept |
destroy queue instance.
|
inlinenoexcept |
get the number of available slots for writing.
|
inlinenoexcept |
check if the ring buffer is empty.
|
inlinenoexcept |
check if the ring buffer is full.
|
inlinenoexcept |
lock memory in RAM.
|
delete |
move assignment operator.
| other | other object to move. |
|
delete |
copy assignment operator.
| other | other object to copy. |
|
inlinenoexcept |
get the number of pending elements for reading.
|
inlinenoexcept |
pop element from the ring buffer.
| element | output element. |
|
inlinenoexcept |
pop multiple elements from the ring buffer.
| elements | pointer to the output buffer. |
| size | number of elements to pop. |
|
inlinenoexcept |
push element into the ring buffer.
| element | element to push. |
|
inlinenoexcept |
push multiple elements into the ring buffer.
| elements | pointer to the first element. |
| size | number of elements to push. |
|
inlinenoexcept |
try to pop element from the ring buffer.
| element | output element. |
|
inlinenoexcept |
try to pop multiple elements from the ring buffer.
| elements | pointer to the output buffer. |
| size | maximum number of elements to pop. |
|
inlinenoexcept |
try to push element into ring buffer.
| element | element to push. |
|
inlinenoexcept |
try to push multiple elements into the ring buffer.
| elements | pointer to the first element. |
| size | number of elements to push. |