« Index of all namespaces of this project
API for updating the tuple count structure of the form { subject { action { object [count timestamp] } } } Input tuples are expected to be of the form [subject action object timestamp]. Note that in streamsum, the top-level map is a mutable Map provided by some external KV storage. Each value in the top-level map is a clojure nested structure of the form { action {object [count timestamp]}}
(dec-count! cache [subject action object timestamp])
Decrements the count for the given [subject action object] key. Timestamp is ignored. Returns the updated structure associated with subject, or nil if there is no match for the key.
(dec-count-in-val v [action object])
For value structure of the form {action {object [count time]}}, decrements the count for the given [action object] key.
(inc-count! cache [subject action object timestamp])
Increments the count for the given key and replaces the timestamp if it is greater than the previous value. Returns the updated structure associated with subject.