[−][src]Trait clepsydra::Store
A Store
is responsible for durable storage. Clients of the library should
provide an implementation and pass an instance in to the constructor of
crate::Database.
Stores are presumed to model something like maps over KeyVers. That is, they are "multi-version" maps, supporting the "multi-version concurrency control" (MVCC) protocols, of which Ocean Vista is a distributed variant.
When writing, initially an un-evaluated expression-entry of type
Entry::Delayed is written to the Store
. Later the same KeyVer
will be
updated with an Entry::Settled, when watermark time has advanced to
the point that it's safe to Lang::eval_expr the delayed expression. If at
any point the writing phase of the transaction aborts, an Entry::Aborted
entry will be written instead. All this happens inside the crate::Database
though; all Store has to do is write to some backing store.
Required methods
pub fn get_key_at_or_before_time(
&self,
kv: &KeyVer<L>
) -> Option<(GlobalTime, Entry<L>)>
[src]
&self,
kv: &KeyVer<L>
) -> Option<(GlobalTime, Entry<L>)>