public class DeltaCRDTLWWMap extends DeltaBasedCRDT
| Modifier and Type | Field and Description |
|---|---|
static pt.unl.fct.di.novasys.network.ISerializer<DeltaCRDTLWWMap> |
serializer
A serializer that serializes the CRDT into (and from) a ByteBuf.
|
state| Constructor and Description |
|---|
DeltaCRDTLWWMap(ReplicaID replicaID) |
DeltaCRDTLWWMap(VVState state) |
| Modifier and Type | Method and Description |
|---|---|
GenericCRDT |
copy()
Creates a copy of the CRDT.
|
DeltaCRDTLWWMap |
generateDelta(VersionVector vv)
Calculates a delta from a given version for the current state.
|
DeltaCRDTLWWMap |
generateDelta(VersionVector vv,
CRDTsTypes.FLAVOR flavor)
Calculates a delta from a given version for the current state.
|
GenericCRDT |
get(CRDTTypeKeyPair key)
Gets the CRDT associated with the given key.
|
Iterator<Map.Entry<CRDTTypeKeyPair,GenericCRDT>> |
iterator()
Returns an iterator of the CRDTs in the map.
|
DeltaCRDTLWWMap |
mergeDelta(DeltaBasedCRDT crdt)
Applies a delta to the current state.
|
DeltaCRDTLWWMap |
put(CRDTTypeKeyPair key,
GenericCRDT crdt)
Puts a CRDT into the map, with a given key.
|
void |
serialize(io.netty.buffer.ByteBuf in)
Serializes the CRDT into a ByteBuf
|
getReplicaID, getReplicaStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeserializeDataType, getTypepublic static pt.unl.fct.di.novasys.network.ISerializer<DeltaCRDTLWWMap> serializer
public DeltaCRDTLWWMap(ReplicaID replicaID)
public DeltaCRDTLWWMap(VVState state)
public DeltaCRDTLWWMap put(CRDTTypeKeyPair key, GenericCRDT crdt)
key - key of the valuecrdt - CRDT to be insertedpublic GenericCRDT get(CRDTTypeKeyPair key)
key - key to be searchedpublic Iterator<Map.Entry<CRDTTypeKeyPair,GenericCRDT>> iterator()
public GenericCRDT copy()
GenericCRDTpublic void serialize(io.netty.buffer.ByteBuf in)
throws IOException
GenericCRDTin - ByteBuf to serialize the CRDT toIOException - if an error occurs while serializingpublic DeltaCRDTLWWMap generateDelta(VersionVector vv)
generateDelta in interface DeltaCRDTgenerateDelta in class DeltaBasedCRDTvv - a version version to calculate the delta frompublic DeltaCRDTLWWMap generateDelta(VersionVector vv, CRDTsTypes.FLAVOR flavor)
vv - a version version to calculate the delta fromflavor - types of CRDTs to take in account while creating the deltapublic DeltaCRDTLWWMap mergeDelta(DeltaBasedCRDT crdt)
mergeDelta in interface DeltaCRDTmergeDelta in class DeltaBasedCRDTcrdt - a crdt representing the deltaCRDTNotValidException - if the crdt passed as argument is invalidCopyright © 2024. All rights reserved.