barrel_design_cursor (barrel_design v0.1.0)
View SourcePinned read cursors: a RocksDB snapshot of a view's store, held so every page of one read comes from the same checkpoint and generation. Kept in a public table owned by barrel_design_dbs; the database's process creates, expires and evicts its own, and releases them all before it closes its store.
Summary
Functions
Release the least recently used cursors of a database until it holds fewer than Max.
Release the database's cursors unused for Ttl milliseconds.
The modules a database's open cursors hold.
Ask the database process to keep a reader's snapshot as a cursor. It is refused ({error, revoked}) unless the activation the read started under is still the design's current one.
Release every cursor of a database: its store is closing.
Release the cursors a database process held: it is gone.
Release the cursors of some views: their design is gone.
Functions
-spec evict(binary(), pos_integer()) -> ok.
Release the least recently used cursors of a database until it holds fewer than Max.
-spec expire(binary(), non_neg_integer()) -> ok.
Release the database's cursors unused for Ttl milliseconds.
-spec insert(binary(), binary(), binary(), non_neg_integer(), term(), [binary()], term(), pid()) -> pos_integer().
The modules a database's open cursors hold.
-spec new_table() -> ok.
-spec pin(pid(), binary(), binary(), non_neg_integer(), term(), [binary()], term()) -> {ok, pos_integer()} | {error, term()}.
Ask the database process to keep a reader's snapshot as a cursor. It is refused ({error, revoked}) unless the activation the read started under is still the design's current one.
-spec release(term()) -> ok.
-spec release_db(binary()) -> ok.
Release every cursor of a database: its store is closing.
-spec release_owner(pid()) -> ok.
Release the cursors a database process held: it is gone.
Release the cursors of some views: their design is gone.