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.
sourceraw docstring

finished?clj

(finished? engine)
source

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
sourceraw docstring

has-capacity?clj

(has-capacity? engine)
source

init-engineclj

(init-engine engine get-pages-fn)
source

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
sourceraw 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.
sourceraw 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.
sourceraw docstring

run!!clj

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

run-from-queue!clj

(run-from-queue! {:keys [runner-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.
sourceraw docstring

runner-fnclj

(runner-fn f ch-result)
source

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.
sourceraw docstring

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

× close