Package com.hazelcast.config
Class CRDTReplicationConfig
java.lang.Object
com.hazelcast.config.CRDTReplicationConfig
Configures the replication mechanism for all
CRDT
implementations.
The CRDT states are replicated in rounds (the period is configurable)
and in each round the state is replicated up to the configured number
of members.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default maximum number of members to which the CRDT states are replicated in a single round.static final int
The default period between two CRDT replication rounds. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns the maximum number of target members that we replicate the CRDT states to in one period.int
Returns the period between two replications of CRDT states in milliseconds.int
hashCode()
setMaxConcurrentReplicationTargets
(int maxConcurrentReplicationTargets) Sets the maximum number of target members that we replicate the CRDT states to in one period.setReplicationPeriodMillis
(int replicationPeriodMillis) Sets the period between two replications of CRDT states in milliseconds.
-
Field Details
-
DEFAULT_REPLICATION_PERIOD_MILLIS
public static final int DEFAULT_REPLICATION_PERIOD_MILLISThe default period between two CRDT replication rounds.- See Also:
-
DEFAULT_MAX_CONCURRENT_REPLICATION_TARGETS
public static final int DEFAULT_MAX_CONCURRENT_REPLICATION_TARGETSThe default maximum number of members to which the CRDT states are replicated in a single round.- See Also:
-
-
Constructor Details
-
CRDTReplicationConfig
public CRDTReplicationConfig()
-
-
Method Details
-
getReplicationPeriodMillis
public int getReplicationPeriodMillis()Returns the period between two replications of CRDT states in milliseconds. -
setReplicationPeriodMillis
Sets the period between two replications of CRDT states in milliseconds. A lower value will increase the speed at which changes are disseminated to other cluster members at the expense of burst-like behaviour - fewer updates will be batched together in one replication message and one update to a CRDT may cause a sudden burst of replication messages in a short time interval. The value must be a positive non-null integer.- Parameters:
replicationPeriodMillis
- the replication period- Returns:
- this config
-
getMaxConcurrentReplicationTargets
public int getMaxConcurrentReplicationTargets()Returns the maximum number of target members that we replicate the CRDT states to in one period. -
setMaxConcurrentReplicationTargets
public CRDTReplicationConfig setMaxConcurrentReplicationTargets(int maxConcurrentReplicationTargets) Sets the maximum number of target members that we replicate the CRDT states to in one period. A higher count will lead to states being disseminated more rapidly at the expense of burst-like behaviour - one update to a CRDT will lead to a sudden burst in the number of replication messages in a short time interval.- Parameters:
maxConcurrentReplicationTargets
- the maximum number of replication targets in a replication period- Returns:
- this config
-
equals
-
hashCode
public int hashCode()
-