Package io.atomix.protocols.backup
Class MultiPrimaryProtocolConfig
java.lang.Object
io.atomix.primitive.protocol.PrimitiveProtocolConfig<MultiPrimaryProtocolConfig>
io.atomix.protocols.backup.MultiPrimaryProtocolConfig
- All Implemented Interfaces:
io.atomix.utils.config.Config,io.atomix.utils.config.TypedConfig<io.atomix.primitive.protocol.PrimitiveProtocol.Type>
public class MultiPrimaryProtocolConfig extends io.atomix.primitive.protocol.PrimitiveProtocolConfig<MultiPrimaryProtocolConfig>
Multi-primary protocol configuration.
-
Constructor Summary
Constructors Constructor Description MultiPrimaryProtocolConfig() -
Method Summary
Modifier and Type Method Description intgetBackups()Returns the number of backups.io.atomix.primitive.ConsistencygetConsistency()Returns the consistency level.java.lang.StringgetGroup()Returns the partition group.intgetMaxRetries()Returns the maximum allowed number of retries.io.atomix.primitive.partition.Partitioner<java.lang.String>getPartitioner()Returns the protocol partitioner.io.atomix.primitive.RecoverygetRecovery()Returns the recovery strategy.io.atomix.primitive.ReplicationgetReplication()Returns the replication level.java.time.DurationgetRetryDelay()Returns the retry delay.io.atomix.primitive.protocol.PrimitiveProtocol.TypegetType()MultiPrimaryProtocolConfigsetBackups(int numBackups)Sets the number of backups.MultiPrimaryProtocolConfigsetConsistency(io.atomix.primitive.Consistency consistency)Sets the consistency level.MultiPrimaryProtocolConfigsetGroup(java.lang.String group)Sets the partition group.MultiPrimaryProtocolConfigsetMaxRetries(int maxRetries)Sets the maximum allowed number of retries.MultiPrimaryProtocolConfigsetPartitioner(io.atomix.primitive.partition.Partitioner<java.lang.String> partitioner)Sets the protocol partitioner.MultiPrimaryProtocolConfigsetRecovery(io.atomix.primitive.Recovery recovery)Sets the recovery strategy.MultiPrimaryProtocolConfigsetReplication(io.atomix.primitive.Replication replication)Sets the replication level.MultiPrimaryProtocolConfigsetRetryDelay(java.time.Duration retryDelay)Sets the retry delay.MultiPrimaryProtocolConfigsetRetryDelayMillis(long retryDelayMillis)Sets the retry delay.
-
Constructor Details
-
MultiPrimaryProtocolConfig
public MultiPrimaryProtocolConfig()
-
-
Method Details
-
getType
public io.atomix.primitive.protocol.PrimitiveProtocol.Type getType() -
getGroup
public java.lang.String getGroup()Returns the partition group.- Returns:
- the partition group
-
setGroup
Sets the partition group.- Parameters:
group- the partition group- Returns:
- the protocol configuration
-
getPartitioner
public io.atomix.primitive.partition.Partitioner<java.lang.String> getPartitioner()Returns the protocol partitioner.- Returns:
- the protocol partitioner
-
setPartitioner
public MultiPrimaryProtocolConfig setPartitioner(io.atomix.primitive.partition.Partitioner<java.lang.String> partitioner)Sets the protocol partitioner.- Parameters:
partitioner- the protocol partitioner- Returns:
- the protocol configuration
-
getConsistency
public io.atomix.primitive.Consistency getConsistency()Returns the consistency level.- Returns:
- the consistency level
-
setConsistency
Sets the consistency level.- Parameters:
consistency- the consistency level- Returns:
- the protocol configuration
-
getReplication
public io.atomix.primitive.Replication getReplication()Returns the replication level.- Returns:
- the replication level
-
setReplication
Sets the replication level.- Parameters:
replication- the replication level- Returns:
- the protocol configuration
-
getRecovery
public io.atomix.primitive.Recovery getRecovery()Returns the recovery strategy.- Returns:
- the recovery strategy
-
setRecovery
Sets the recovery strategy.- Parameters:
recovery- the recovery strategy- Returns:
- the protocol configuration
-
getBackups
public int getBackups()Returns the number of backups.- Returns:
- the number of backups
-
setBackups
Sets the number of backups.- Parameters:
numBackups- the number of backups- Returns:
- the protocol configuration
-
getMaxRetries
public int getMaxRetries()Returns the maximum allowed number of retries.- Returns:
- the maximum allowed number of retries
-
setMaxRetries
Sets the maximum allowed number of retries.- Parameters:
maxRetries- the maximum allowed number of retries- Returns:
- the protocol configuration
-
getRetryDelay
public java.time.Duration getRetryDelay()Returns the retry delay.- Returns:
- the retry delay
-
setRetryDelayMillis
Sets the retry delay.- Parameters:
retryDelayMillis- the retry delay in milliseconds- Returns:
- the protocol configuration
-
setRetryDelay
Sets the retry delay.- Parameters:
retryDelay- the retry delay- Returns:
- the protocol configuration
-