12 #ifndef ROC_PACKET_SORTED_QUEUE_H_
13 #define ROC_PACKET_SORTED_QUEUE_H_
75 const size_t max_size_;
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Intrusive doubly-linked list.
Base class for non-copyable objects.
PacketPtr latest() const
Get the latest packet that were ever added to the queue.
PacketPtr tail() const
Get last packet in the queue.
virtual status::StatusCode write(const PacketPtr &packet)
Add packet to the queue.
virtual status::StatusCode read(PacketPtr &packet)
Read next packet.
PacketPtr head() const
Get first packet in the queue.
SortedQueue(size_t max_size)
Construct empty queue.
size_t size() const
Get number of packets in queue.
Intrusive doubly-linked list.