Liking cljdoc? Tell your friends :D

memento.redis.loader


abandon-load-scriptclj

source

abandon-load-w-sec-scriptclj

source

bulk-setclj

source

cached-entriesclj

(cached-entries conn k-loads)

Polls foreign-load status without returning cached values.

Returns the original request tuples for completed or abandoned foreign loads.

Polls foreign-load status without returning cached values.

Returns the original request tuples for completed or abandoned foreign loads.
sourceraw docstring

cached-entries-scriptclj

source

complete-loadclj

(complete-load conn key-list values)

Finalize a claimed load in Redis. Kept separate from LoaderSupport so race tests can gate the interval between Redis publication and local waiter release.

Finalize a claimed load in Redis. Kept separate from LoaderSupport so race tests can
gate the interval between Redis publication and local waiter release.
sourceraw docstring

fetchclj

(fetch conn
       k
       epoch-key
       active-invalidation-records-key
       entry-indexes-key
       load-marker
       load-ms
       fade-ms)

Fetch a value. See doc/secondary-index-invalidation.md for response shapes.

Under the wire protocol, val comes back as raw bytes (envelope bytes for cached values, 17-byte load-marker bytes for foreign / our load markers, nil for missing keys when load-ms is non-positive).

load-marker is a UUID; it is serialized to its 17-byte wire shape via (car/raw (Load/loadMarkerBytes load-marker)) at the Lua call boundary so byte-equality inside abandon-load.lua / refresh-load-markers.lua / finish-load*.lua works.

load-ms is load marker liveness in ms; if 0 or negative, no load marker is inserted (used by Loader.ifCached).

fade-ms is fade setting for entries in ms if any.

Fetch a value. See doc/secondary-index-invalidation.md for response shapes.

Under the wire protocol, `val` comes back as raw bytes (envelope
bytes for cached values, 17-byte load-marker bytes for foreign / our load
markers, nil for missing keys when load-ms is non-positive).

load-marker is a UUID; it is serialized to its 17-byte wire
shape via (car/raw (Load/loadMarkerBytes load-marker)) at the Lua call boundary
so byte-equality inside abandon-load.lua / refresh-load-markers.lua /
finish-load*.lua works.

load-ms is load marker liveness in ms; if 0 or negative, no load marker is
inserted (used by Loader.ifCached).

fade-ms is fade setting for entries in ms if any.
sourceraw docstring

fetch-scriptclj

source

finish-load-scriptclj

source

for-confclj

(for-conf conf keygen)
source

invalidation-maintenance-stepclj

(invalidation-maintenance-step maint)
source

invalidation-statusesclj

(invalidation-statuses conn active-records-key record-keys id-keys)

One atomic domain observation, with record flags followed by secondary-ID flags.

One atomic domain observation, with record flags followed by secondary-ID flags.
sourceraw docstring

invalidation-statuses-scriptclj

source

load-marker-fade-secclj

How long before a load marker fades. This is to prevent JVM exiting or dying from leaving LoadMarkers in Redis indefinitely, causing everyone to block on that key forever. This time is refreshed every second by a daemon thread, however a long GC will cause LoadMarkers to fade when they shouldn't.

Adjust this setting appropriately via memento.redis.load_marker_fade system property.

How long before a load marker fades. This is to prevent JVM exiting or dying from leaving LoadMarkers
in Redis indefinitely, causing everyone to block on that key forever. This time is refreshed every
second by a daemon thread, however a long GC will cause LoadMarkers to fade when they shouldn't.

Adjust this setting appropriately via memento.redis.load_marker_fade system property.
sourceraw docstring

maintclj

Map of conn to map of key to promise.

For each connection the submap contains Redis keys to a Load object. In Load object:

  • If marker is present, then it's our load, and we must deliver to redis.
  • Maintenance waits signal the local owner to retry; only that owner delivers the result.
Map of conn to map of key to promise.

For each connection the submap contains Redis keys to a Load object. In Load object:
- If marker is present, then it's our load, and we must deliver to redis.
 - Maintenance waits signal the local owner to retry; only that owner delivers the result.
sourceraw docstring

maintain-conn-loadsclj

(maintain-conn-loads conn loads-map refresh-load-markers?)

Signals owners waiting for foreign loads and optionally refreshes our load markers. Status observations never complete result promises or remove loads.

This should be only called from one thread.

Signals owners waiting for foreign loads and optionally refreshes our load markers.
 Status observations never complete result promises or remove loads.

This should be only called from one thread.
sourceraw docstring

maintain-invalidation-waitsclj

(maintain-invalidation-waits conn loads-map)

Deduplicate watched records and IDs per domain. Only signal the observed wait; the owner remains responsible for marker cleanup and result-promise release.

Deduplicate watched records and IDs per domain. Only signal the observed wait;
the owner remains responsible for marker cleanup and result-promise release.
sourceraw docstring

maintenance-stepclj

(maintenance-step maint refresh-load-markers?)

Perform maintenance multithreaded, one future per each connection after the first.

Perform maintenance multithreaded, one future per each connection after the first.
sourceraw docstring

marker-refresh-batch-sizeclj

source

put-valueclj

(put-value conn kg k value expire)
source

put-value-scriptclj

source

put-value-w-sec-scriptclj

source

refresh-load-marker-batchclj

(refresh-load-marker-batch conn keys markers marker-fade)
source

refresh-load-markersclj

(refresh-load-markers conn ks markers marker-fade)

Refresh expire of load markers under keys ks, if they are still the same as we expect. markers must contain raw [0x03][16B UUID] byte arrays.

Refresh expire of load markers under keys ks, if they are still the same as we
expect. markers must contain raw [0x03][16B UUID] byte arrays.
sourceraw docstring

refresh-load-markers-scriptclj

source

remove-load-markersclj

(remove-load-markers maint-map)

Remove all load markers owned by us from Redis. Useful when JVM is shutting down and we want any foreign JVMs on same cache to stop waiting for values that ain't happening.

Remove all load markers owned by us from Redis. Useful when JVM is shutting down
and we want any foreign JVMs on same cache to stop waiting for values that ain't happening.
sourceraw docstring

supportclj

source

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