durable-queue documentation
->Task
fn
Positional factory function for class durable_queue.Task.
->TaskSlab
fn
Positional factory function for class durable_queue.TaskSlab.
immediate-task-seq
fn
Returns a finite lazy sequence of tasks for q-name which terminates once there are
no more tasks immediately available.
interval-task-seq
fn
Returns a lazy sequence of tasks that can be consumed in interval milliseconds. This will
terminate after that time has elapsed, even if there are still tasks immediately available.
map->Task
fn
Factory function for class durable_queue.Task, taking a map of keywords to field values.
put!
fn
A blocking enqueue to name. If timeout is specified, returns false if unable to
enqueue within timeout milliseconds.
queues
fn
Creates a point of interaction for queues, backed by disk storage in directory.
The following options can be specified:
max-queue-size - the maximum number of elements that can be in the queue before `put!`
blocks. Defaults to `Integer/MAX_VALUE`.
complete? - a predicate that is run on pre-existing tasks to check if they were already
completed. If the tasks in the queue are non-idempotent, this must be
specified for correct behavior. Defaults to always returning false.
slab-size - The size, in bytes, of the backing files for the queue. Defaults to 16mb.
fsync-put? - if true, each `put!` will force an fsync. Defaults to true.
fsync-take? - if true, each `take!` will force an fsync. Defaults to false.
take!
fn
A blocking dequeue from name. If timeout is specified, returns timeout-val if
no task is available within timeout milliseconds.