public abstract class StateBasedCRDT extends CRDT implements StateCRDT
| Modifier and Type | Field and Description |
|---|---|
protected VVState |
state
State of the replica.
|
| Constructor and Description |
|---|
StateBasedCRDT(CRDTsTypes type,
ReplicaID replicaID)
Creates an abstract state-based CRDT type.
|
StateBasedCRDT(CRDTsTypes type,
VVState state)
Creates an abstract state-based CRDT type, with a previously created state.
|
| Modifier and Type | Method and Description |
|---|---|
ReplicaID |
getReplicaID()
Gets the replica identifier
|
VVState |
getReplicaState()
Gets the replica state.
|
abstract StateBasedCRDT |
merge(StateBasedCRDT crdt)
Handles the merging of this CRDT with other state-based CRDT received from the network.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopy, deserializeDataType, getType, serializeprotected VVState state
public StateBasedCRDT(CRDTsTypes type, VVState state)
type - the type of the CRDTstate - the state of the replicapublic StateBasedCRDT(CRDTsTypes type, ReplicaID replicaID)
type - type of the CRDTreplicaID - replica identifier.public VVState getReplicaState()
StateCRDTgetReplicaState in interface StateCRDTpublic ReplicaID getReplicaID()
StateCRDTgetReplicaID in interface StateCRDTpublic abstract StateBasedCRDT merge(StateBasedCRDT crdt) throws CRDTNotValidException
StateCRDTmerge in interface StateCRDTcrdt - the CRDT to mergeCRDTNotValidException - if the CRDT is invalid.Copyright © 2024. All rights reserved.