Behaviours: sbroker_fair_queue, sbroker_queue.
Implements a head or tail drop queue with a timeout queue management algorithm, where items are dropped once their sojourn time is greater than or equal to a timeout value.
sbroker_timeout_queue
can be used as an sbroker_queue
module in
sbroker
. Its argument is of the form:
{out | out_r, Timeout :: timeout(), drop | drop_r, Min :: non_neg_integer(), Max :: non_neg_integer() | infinity}.The first element is
out
for a FIFO queue and out_r
for a LIFO queue.
Timeout
is the timeout value in milli_seconds
, i.e. the minimum
sojourn time at which items are dropped from the queue when the queue is
above the minimum size Min
. The third element determines whether to drop
from head (drop
) or drop from the tail (drop_r
) when the queue is above
the maximum size Max
.Generated by EDoc, Sep 29 2016, 17:17:28.