Liking cljdoc? Tell your friends :D
Clojure only.

kala.storage.file

Durable directory-backed Storage adapter. Layout:

<root>/segments/<url-encoded-id> content files <root>/log/<zero-padded-t>.dat one file per log entry

Appends write to a temp file, fsync, atomically rename, then fsync the parent directory — durability before ack, surviving both process kill and machine crash. A fresh adapter over the same directory sees every acked entry, so crash recovery is: open, rebuild, continue.

Segment ids round-trip through URL-encoding of (str id); note that filesystems with case-insensitive names (e.g. macOS APFS defaults) will conflate ids differing only by case.

Durable directory-backed Storage adapter. Layout:

   <root>/segments/<url-encoded-id>   content files
   <root>/log/<zero-padded-t>.dat     one file per log entry

Appends write to a temp file, fsync, atomically rename, then fsync the
parent directory — durability before ack, surviving both process kill and
machine crash. A fresh adapter over the same directory sees every acked
entry, so crash recovery is: open, rebuild, continue.

Segment ids round-trip through URL-encoding of (str id); note that
filesystems with case-insensitive names (e.g. macOS APFS defaults) will
conflate ids differing only by case.
raw docstring

open-storageclj

(open-storage path)

Open (or create) the storage rooted at path. Over an existing directory every acked segment and log entry is preserved. The append-time monotonicity check compares against the last t held from open — under the single-writer topology that is always the freshest acked entry; the adapter does not re-derive it from the directory per commit.

Open (or create) the storage rooted at path. Over an existing directory
every acked segment and log entry is preserved. The append-time
monotonicity check compares against the last t held from open — under the
single-writer topology that is always the freshest acked entry; the adapter
does not re-derive it from the directory per commit.
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