Package com.hazelcast.config
Class CRDTReplicationConfig
- java.lang.Object
-
- com.hazelcast.config.CRDTReplicationConfig
-
public class CRDTReplicationConfig extends java.lang.Object
Configures the replication mechanism for allCRDT
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
Fields Modifier and Type Field Description static int
DEFAULT_MAX_CONCURRENT_REPLICATION_TARGETS
The default maximum number of members to which the CRDT states are replicated in a single round.static int
DEFAULT_REPLICATION_PERIOD_MILLIS
The default period between two CRDT replication rounds.
-
Constructor Summary
Constructors Constructor Description CRDTReplicationConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
getMaxConcurrentReplicationTargets()
Returns the maximum number of target members that we replicate the CRDT states to in one period.int
getReplicationPeriodMillis()
Returns the period between two replications of CRDT states in milliseconds.int
hashCode()
CRDTReplicationConfig
setMaxConcurrentReplicationTargets(int maxConcurrentReplicationTargets)
Sets the maximum number of target members that we replicate the CRDT states to in one period.CRDTReplicationConfig
setReplicationPeriodMillis(int replicationPeriodMillis)
Sets the period between two replications of CRDT states in milliseconds.
-
-
-
Field Detail
-
DEFAULT_REPLICATION_PERIOD_MILLIS
public static final int DEFAULT_REPLICATION_PERIOD_MILLIS
The default period between two CRDT replication rounds.- See Also:
- Constant Field Values
-
DEFAULT_MAX_CONCURRENT_REPLICATION_TARGETS
public static final int DEFAULT_MAX_CONCURRENT_REPLICATION_TARGETS
The default maximum number of members to which the CRDT states are replicated in a single round.- See Also:
- Constant Field Values
-
-
Method Detail
-
getReplicationPeriodMillis
public int getReplicationPeriodMillis()
Returns the period between two replications of CRDT states in milliseconds.
-
setReplicationPeriodMillis
public CRDTReplicationConfig setReplicationPeriodMillis(int replicationPeriodMillis)
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 - less 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
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-