Liking cljdoc? Tell your friends :D

d-core.queue


bounded?clj

(bounded? queue)

dequeueclj


dequeue!clj

(dequeue! queue)

Removes and returns the next item from the queue, or nil when empty.

Removes and returns the next item from the queue, or nil when empty.
raw docstring

enqueueclj


enqueue!clj

(enqueue! queue item)

Offers item to queue without blocking. Returns true when accepted.

On a BOUNDED queue a false return means the queue is full -- the caller is responsible for deciding whether to retry, block, or shed load. Never assume the item was stored.

Offers `item` to `queue` without blocking. Returns true when accepted.

On a BOUNDED queue a false return means the queue is full -- the caller is
responsible for deciding whether to retry, block, or shed load. Never assume
the item was stored.
raw docstring

enqueue-blocking!clj

(enqueue-blocking! queue item timeout-ms)

Offers item to queue, waiting up to timeout-ms for capacity. Returns true when stored, false on timeout. Use this where dropping a message would be data loss and waiting is an acceptable backpressure signal.

Offers `item` to `queue`, waiting up to `timeout-ms` for capacity.
Returns true when stored, false on timeout. Use this where dropping a message
would be data loss and waiting is an acceptable backpressure signal.
raw docstring

get-or-create-queue!clj

(get-or-create-queue! queues topic)

Returns the queue for topic, creating it if missing.

Returns the queue for `topic`, creating it if missing.
raw docstring

get-queueclj

(get-queue queues topic)

get-queue!clj

(get-queue! queues topic)

known-topicsclj

(known-topics queues)

make-queueclj

(make-queue)
(make-queue capacity)

Creates a BlockingQueue. With a positive capacity the queue is bounded and enqueue! will start returning false once full -- the signal producers must use to apply backpressure.

Creates a BlockingQueue. With a positive `capacity` the queue is bounded and
`enqueue!` will start returning false once full -- the signal producers must
use to apply backpressure.
raw docstring

peekclj

(peek queue)

Returns the next item without removing it, or nil when empty.

Returns the next item without removing it, or nil when empty.
raw docstring

poll!clj

(poll! queue timeout-ms)

Removes and returns the next item from the queue, waiting up to timeout-ms ms if empty. Returns nil if timeout expires without an item.

Removes and returns the next item from the queue, waiting up to `timeout-ms` ms if empty.
Returns nil if timeout expires without an item.
raw docstring

remaining-capacityclj

(remaining-capacity queue)

How many more items queue accepts without blocking. Integer/MAX_VALUE for unbounded queues. Producers should consult this before fetching a batch.

How many more items `queue` accepts without blocking. `Integer/MAX_VALUE` for
unbounded queues. Producers should consult this before fetching a batch.
raw docstring

sizeclj

(size queue)

take!clj

(take! queue)

Removes and returns the next item from the queue, blocking indefinitely until available.

Removes and returns the next item from the queue, blocking indefinitely until available.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close