|
| QueueingLogicPriRL (size_t nb_workers, size_t capacity, FMap map_to_worker, size_t nb_priorities=2) |
|
int | push_front (size_t queue_id, size_t priority, const T &item) |
|
int | push_front (size_t queue_id, size_t priority, T &&item) |
|
void | pop_back (size_t worker_id, size_t *queue_id, size_t *priority, T *pItem) |
|
void | pop_back (size_t worker_id, size_t *queue_id, T *pItem) |
|
size_t | size (size_t queue_id) const |
| Get the occupancy of the logical queue with id queue_id . More...
|
|
size_t | size (size_t queue_id, size_t priority) const |
|
void | set_capacity (size_t queue_id, size_t c) |
|
void | set_capacity (size_t queue_id, size_t priority, size_t c) |
|
void | set_capacity_for_all (size_t c) |
|
void | set_rate (size_t queue_id, uint64_t pps) |
|
void | set_rate (size_t queue_id, size_t priority, uint64_t pps) |
|
void | set_rate_for_all (uint64_t pps) |
| Set the rate of all the priority queues of all logical queues to pps . More...
|
|
| QueueingLogicPriRL (const QueueingLogicPriRL &)=delete |
| Deleted copy constructor. More...
|
|
QueueingLogicPriRL & | operator= (const QueueingLogicPriRL &)=delete |
| Deleted copy assignment operator. More...
|
|
| QueueingLogicPriRL (QueueingLogicPriRL &&)=delete |
| Deleted move constructor. More...
|
|
QueueingLogicPriRL && | operator= (QueueingLogicPriRL &&)=delete |
| Deleted move assignment operator. More...
|
|
template<typename T, typename FMap>
class bm::QueueingLogicPriRL< T, FMap >
This class is slightly more advanced than QueueingLogicRL. The difference between the 2 is that this one offers the ability to set several priority queues for each logical queue. Priority queues are numbered from 0
to nb_priorities-1
(see QueueingLogicPriRL::QueueingLogicPriRL()). Priority 0
is the lowest priority queue. Each priority queue can have its own rate and its own capacity. Queues will be served in order of priority, until their respective maximum rate is reached. If no maximum rate is set, queues with a high priority can starve lower-priority queues. For example, if the queue with priority nb_priorities - 1
always contains at least one element, the other queues will never be served. As for QueueingLogicRL, the write behavior (push_front()) is not blocking: once a logical queue is full, subsequent incoming elements will be dropped until the queue starts draining again. Look at the documentation for QueueingLogic for more information about the template parameters (they are the same).
template<typename T , typename FMap >
If priority queue priority
of logical queue queue_id
is full, the function will return 0
immediately. Otherwise, item
will be copied to the queue and the function will return 1
. If queue_id
or priority
are incorrect, an exception of type std::out_of_range will be thrown (same if the FMap object provided to the constructor does not behave correctly).