Liking cljdoc? Tell your friends :D

kala.storage

The storage protocol (spec seam 2): content-addressed segments plus an ordered, append-only transaction log keyed by t. Implementations must make a log append durable before acknowledging it; adapters beyond memory (local file in TT8) implement this same contract. The log's monotonicity guard lives here too, so every backend raises the same error shape.

The storage protocol (spec seam 2): content-addressed segments plus an
ordered, append-only transaction log keyed by t. Implementations must make
a log append durable before acknowledging it; adapters beyond memory
(local file in TT8) implement this same contract. The log's monotonicity
guard lives here too, so every backend raises the same error shape.
raw docstring

check-monotonic-tclj

(check-monotonic-t t last-t)

The log's one invariant, enforced at the append seam: t must be strictly greater than the backend's last acked t, or :storage/non-monotonic-t raises with {:t :last-t}. Adapters call this before appending — a new backend inherits the check instead of re-deriving it.

The log's one invariant, enforced at the append seam: t must be strictly
greater than the backend's last acked t, or :storage/non-monotonic-t
raises with {:t :last-t}. Adapters call this before appending — a new
backend inherits the check instead of re-deriving it.
raw docstring

Storagecljprotocol

append-logclj

(append-log storage entry)

Append one log entry, a map holding :t and :datoms. Returns :ok once the entry is durable. Entries must carry strictly increasing :t.

Append one log entry, a map holding :t and :datoms. Returns :ok once the
entry is durable. Entries must carry strictly increasing :t.

get-segmentclj

(get-segment storage id)

The data stored under id, or nil when absent.

The data stored under id, or nil when absent.

list-segmentsclj

(list-segments storage)

A seq of all stored segment ids.

A seq of all stored segment ids.

log-scanclj

(log-scan storage from-t to-t)

All log entries with from-t <= t <= to-t, ordered by t ascending.

All log entries with from-t <= t <= to-t, ordered by t ascending.

put-segmentclj

(put-segment storage id data)

Store data under a unique id. Idempotent for a given id.

Store data under a unique id. Idempotent for a given id.

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