Class PrimaryBackupSessionClient.Builder
java.lang.Object
io.atomix.primitive.session.SessionClient.Builder
io.atomix.protocols.backup.session.PrimaryBackupSessionClient.Builder
- All Implemented Interfaces:
io.atomix.utils.Builder<io.atomix.primitive.session.SessionClient>
- Enclosing class:
- PrimaryBackupSessionClient
public abstract static class PrimaryBackupSessionClient.Builder
extends io.atomix.primitive.session.SessionClient.Builder
Primary-backup partition proxy builder.
-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description PrimaryBackupSessionClient.BuilderwithConsistency(io.atomix.primitive.Consistency consistency)Sets the protocol consistency model.PrimaryBackupSessionClient.BuilderwithMaxRetries(int maxRetries)Sets the maximum number of retries before an operation can be failed.PrimaryBackupSessionClient.BuilderwithNumBackups(int numBackups)Sets the number of backups.PrimaryBackupSessionClient.BuilderwithRecovery(io.atomix.primitive.Recovery recovery)Sets the protocol recovery strategy.PrimaryBackupSessionClient.BuilderwithReplication(io.atomix.primitive.Replication replication)Sets the protocol replication strategy.PrimaryBackupSessionClient.BuilderwithRetryDelay(long retryDelay, java.util.concurrent.TimeUnit timeUnit)Sets the operation retry delay.PrimaryBackupSessionClient.BuilderwithRetryDelay(java.time.Duration retryDelay)Sets the operation retry delay.PrimaryBackupSessionClient.BuilderwithRetryDelayMillis(long retryDelayMillis)Sets the operation retry delay.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withConsistency
public PrimaryBackupSessionClient.Builder withConsistency(io.atomix.primitive.Consistency consistency)Sets the protocol consistency model.- Parameters:
consistency- the protocol consistency model- Returns:
- the protocol builder
-
withReplication
public PrimaryBackupSessionClient.Builder withReplication(io.atomix.primitive.Replication replication)Sets the protocol replication strategy.- Parameters:
replication- the protocol replication strategy- Returns:
- the protocol builder
-
withRecovery
Sets the protocol recovery strategy.- Parameters:
recovery- the protocol recovery strategy- Returns:
- the protocol builder
-
withNumBackups
Sets the number of backups.- Parameters:
numBackups- the number of backups- Returns:
- the protocol builder
-
withMaxRetries
Sets the maximum number of retries before an operation can be failed.- Parameters:
maxRetries- the maximum number of retries before an operation can be failed- Returns:
- the proxy builder
-
withRetryDelayMillis
Sets the operation retry delay.- Parameters:
retryDelayMillis- the delay between operation retries in milliseconds- Returns:
- the proxy builder
-
withRetryDelay
public PrimaryBackupSessionClient.Builder withRetryDelay(long retryDelay, java.util.concurrent.TimeUnit timeUnit)Sets the operation retry delay.- Parameters:
retryDelay- the delay between operation retriestimeUnit- the delay time unit- Returns:
- the proxy builder
- Throws:
java.lang.NullPointerException- if the time unit is null
-
withRetryDelay
Sets the operation retry delay.- Parameters:
retryDelay- the delay between operation retries- Returns:
- the proxy builder
- Throws:
java.lang.NullPointerException- if the delay is null
-