Liking cljdoc? Tell your friends :D

org.clojars.roklenarcic.paginator.impl


add-to-batchclj

(add-to-batch engine it)

Adds item to batch, adds batch to queue if max-items was reached.

Adds item to batch, adds batch to queue if max-items was reached.
raw docstring

finished?clj

(finished? engine)

force-enqueueclj

(force-enqueue engine)

Forces a batch to queue if queue is empty and the runner state allows for more tasks

Forces a batch to queue if queue is empty and the runner state allows for more tasks
raw docstring

has-capacity?clj

(has-capacity? engine)

init-engineclj

(init-engine engine get-pages-fn)

mark-invalid-stateclj

(mark-invalid-state s)

If state is invalid, mark it with an exception

If state is invalid, mark it with an exception
raw docstring

merge-psclj

(merge-ps result paging-state)

Updates an existing pagestate map with results. It will specially handle :pages, :items, :page-cursor, the rest of it is merged into paging-state as is.

Updates an existing pagestate map with results. It will specially handle
:pages, :items, :page-cursor, the rest of it is merged into paging-state as is.
raw docstring

paging-state?clj

(paging-state? s)

Returns true if the map looks like a paging state with cursor.

Returns true if the map looks like a paging state with cursor.
raw docstring

run!!clj

(run!! {:keys [get-pages-fn items-in-runner items-in-process]} paging-states)

run-from-queue!clj

(run-from-queue! {:keys [async-fn ch-result] :as engine})

Enqueues a batch with the runner if there is one in the queue and the runner has capacity. Returns new engine state.

Enqueues a batch with the runner if there is one in the queue and the runner has capacity. Returns new engine state.
raw docstring

swap-xf!clj

(swap-xf! atom* f)

A transducer that runs f on atom* for each item seen.

A transducer that runs f on atom* for each item seen.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close