(create-buffer filename size)
(immediate-task-seq qs q-name)
Returns a finite lazy sequence of tasks for q-name
which terminates once there are
no more tasks immediately available.
Returns a finite lazy sequence of tasks for `q-name` which terminates once there are no more tasks immediately available.
(interval-task-seq qs q-name interval)
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.
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.
(delete! _)
Deletes all files associated with the queues.
Deletes all files associated with the queues.
(fsync _)
Forces an fsync on all modified files.
Forces an fsync on all modified files.
(put! _ q-name task-descriptor)
(put! _ q-name task-descriptor timeout)
A blocking enqueue to name
. If timeout
is specified, returns false
if unable to
enqueue within timeout
milliseconds, true
otherwise.
A blocking enqueue to `name`. If `timeout` is specified, returns `false` if unable to enqueue within `timeout` milliseconds, `true` otherwise.
(stats _)
Returns a map of queue names onto information about the immediate state of the queue.
Returns a map of queue names onto information about the immediate state of the queue.
(take! _ q-name)
(take! _ q-name timeout timeout-val)
A blocking dequeue from name
. If timeout
is specified, returns timeout-val
if
no task is available within timeout
milliseconds.
A blocking dequeue from `name`. If `timeout` is specified, returns `timeout-val` if no task is available within `timeout` milliseconds.
(load-buffer filename)
(load-buffer filename offset length)
(queues directory)
(queues directory
{:keys [max-queue-size complete? slab-size fsync-put? fsync-take?
fsync-threshold fsync-interval]
:or {max-queue-size Integer/MAX_VALUE
complete? nil
slab-size (* 64 1024 1024)
fsync-put? true
fsync-take? false}})
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.
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.
(retry! task)
Marks a task as available for retry.
Marks a task as available for retry.
(task-seq qs q-name)
Returns an infinite lazy sequence of tasks for q-name
.
Returns an infinite lazy sequence of tasks for `q-name`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close