T
- CRDT implementation typepublic interface CRDTReplicationAwareService<T>
Modifier and Type | Method and Description |
---|---|
boolean |
clearCRDTState(Map<String,VectorClock> vectorClocks)
Removes all of the CRDTs with vector clocks equal to the provided vector
clocks.
|
String |
getName()
Returns the name of the service
|
void |
merge(String name,
T value)
Performs a merge of the local
name CRDT with the provided state. |
CRDTReplicationContainer |
prepareMigrationOperation(int maxConfiguredReplicaCount)
Returns a migration operation for all of the CRDT states not owned by
this member.
|
CRDTReplicationContainer |
prepareReplicationOperation(Map<String,VectorClock> lastReplicatedVectorClock,
int targetIndex)
Returns a replication operation for the provided vector clocks.
|
void |
prepareToSafeShutdown()
Prepares the service for replication and shutdown.
|
CRDTReplicationContainer prepareReplicationOperation(Map<String,VectorClock> lastReplicatedVectorClock, int targetIndex)
null
means that there should not be any
replication operation.lastReplicatedVectorClock
- last successfully replicated vector clocktargetIndex
- the index of the replication target in
the membership list containing only data membersString getName()
void merge(String name, T value)
name
CRDT with the provided state.name
- the CRDT namevalue
- the CRDT state to merge into the local stateCRDTReplicationContainer prepareMigrationOperation(int maxConfiguredReplicaCount)
maxConfiguredReplicaCount
- the maximum configured replica count
for the CRDTs to be migrated (excluding)boolean clearCRDTState(Map<String,VectorClock> vectorClocks)
vectorClocks
- a map from CRDT name to a vector clocktrue
if all of the CRDT states have been cleared,
false
otherwisevoid prepareToSafeShutdown()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.