pt.unl.fct.di.novasys.babel.crdts.delta.implementations

Class DeltaLWWCRDTMap

  • All Implemented Interfaces:
    DeltaCRDT, GenericCRDT


    public class DeltaLWWCRDTMap
    extends DeltaBasedCRDT
    A delta-based map with a last-writer-wins policy (LWW) for storing generic CRDTS. The key represents a pair (crdtType,String) and the value as a CRDT of that type. This map is also implemented as a generic CRDT, thus enabling a map of maps of CRDTs (and so forth). The generateDelta method contains the following semantics: all of the entries of the map that correspond to a delta-based CRDT are included in the delta, while the others are excluded. This implementation doesn't support deletes (an alternative that implements this can be found in DeltaORMap) but enables a longer ranger of datatypes embedded into the CRDT. It provides methods to put, delete and get for elements. Additionally, it is possible to iterate over the different elements of the map.

Copyright © 2024. All rights reserved.