| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
CRDT.LWW
Contents
Documentation
Last write wins. Assuming timestamp is unique.
This type is both CmRDT and CvRDT.
Timestamps are assumed unique, totally ordered, and consistent with causal order; i.e., if assignment 1 happened-before assignment 2, the former’s timestamp is less than the latter’s.
Constructors
| LWW | |
Fields
| |
Instances
CvRDT
assign :: Clock m => a -> LWW a -> m (LWW a) Source #
Change state as CvRDT operation. Current value is ignored, because new timestamp is always greater.
Implementation detail
advanceFromLWW :: Clock m => LWW a -> m () Source #