jylis_ex v0.1.0 Jylis.TLOG

A timestamped log. [link]

Link to this section Summary

Functions

Raise the cutoff timestamp to be the timestamp of the latest entry plus one, such that all local entries in the log will be discarded due to having timestamps earlier than the cutoff timestamp

Return the current cutoff timestamp of the log at key as an integer

Get the latest value and timestamp for the register at key

Insert a value/timestamp entry into the log at key

Return the number of entries in the log at key as an integer

Raise the cutoff timestamp of the log to retain at least count entries, by setting the cutoff timestamp to the timestamp of the entry at index count - 1 in the log. Any entries with an earlier timestamp than the entry at that index will be discarded. If count is zero, this is the same as calling clr/2

Raise the cutoff timestamp of the log, causing any entries to be discarded whose timestamp is earlier than the newly given timestamp

Link to this section Functions

Link to this function clr(connection, key)

Raise the cutoff timestamp to be the timestamp of the latest entry plus one, such that all local entries in the log will be discarded due to having timestamps earlier than the cutoff timestamp.

Link to this function cutoff(connection, key)

Return the current cutoff timestamp of the log at key as an integer.

Link to this function get(connection, key)

Get the latest value and timestamp for the register at key.

Returns {:ok, [{value, timestamp}, ...]} on success.

Link to this function ins(connection, key, value, timestamp)

Insert a value/timestamp entry into the log at key.

Link to this function size(connection, key)

Return the number of entries in the log at key as an integer.

Link to this function trim(connection, key, count)

Raise the cutoff timestamp of the log to retain at least count entries, by setting the cutoff timestamp to the timestamp of the entry at index count - 1 in the log. Any entries with an earlier timestamp than the entry at that index will be discarded. If count is zero, this is the same as calling clr/2.

Link to this function trimat(connection, key, timestamp)

Raise the cutoff timestamp of the log, causing any entries to be discarded whose timestamp is earlier than the newly given timestamp.