an eviction channel listenes for successful database inserts/updates and deletes and performs some kind of I/O to them. For instance a concrete implementation could write all successful changes to the in-memory database to a external database to create a persistent version that can be imported during application ramp-up. Eviction channels can be configured to follow certain timing constraints like immediate post transaction eviction or cron like eviction, that is forwarding all the changes every x seconds. Invariants are: (1) Eviction is asynchronous to to the actual transaction, (2) Eviction might fail but to not cause the transaction to fail.
an eviction channel listenes for successful database inserts/updates and deletes and performs some kind of I/O to them. For instance a concrete implementation could write all successful changes to the in-memory database to a external database to create a persistent version that can be imported during application ramp-up. Eviction channels can be configured to follow certain timing constraints like immediate post transaction eviction or cron like eviction, that is forwarding all the changes every x seconds. Invariants are: (1) Eviction is asynchronous to to the actual transaction, (2) Eviction might fail but to not cause the transaction to fail.
(delete this coll-name unique-key old-user-value)
called when a delete took place
called when a delete took place
(delete-coll this coll-name)
call this to delete the respective collection/db at all
call this to delete the respective collection/db at all
(insert this coll-name unique-key user-value)
called when a new value gets inserted into the database.
called when a new value gets inserted into the database.
(start this ctx colls)
starts the eviction channel by reading in the persistent data into the in-memory db denoted by [ctx]. This function assumes that is eviction channel instance is handling all the collection [colls]. returns a future that can be joined to wait for the database to got warmed up.
starts the eviction channel by reading in the persistent data into the in-memory db denoted by [ctx]. This function assumes that is eviction channel instance is handling all the collection [colls]. returns a future that can be joined to wait for the database to got warmed up.
(started? this)
(stop this)
closes the channel. Further evictions must throw an exception.
closes the channel. Further evictions must throw an exception.
(stopped? this)
returns true iff the channel was closed.
returns true iff the channel was closed.
(update this coll-name unique-key old-user-value new-user-value)
called when an update took place
called when an update took place
(alive? this)
returns true iff the eviction channel is up'n running
returns true iff the eviction channel is up'n running
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close