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 Details

  • 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

      public PrimaryBackupSessionClient.Builder withRecovery​(io.atomix.primitive.Recovery recovery)
      Sets the protocol recovery strategy.
      Parameters:
      recovery - the protocol recovery strategy
      Returns:
      the protocol builder
    • withNumBackups

      public PrimaryBackupSessionClient.Builder withNumBackups​(int numBackups)
      Sets the number of backups.
      Parameters:
      numBackups - the number of backups
      Returns:
      the protocol builder
    • withMaxRetries

      public PrimaryBackupSessionClient.Builder withMaxRetries​(int maxRetries)
      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

      public PrimaryBackupSessionClient.Builder withRetryDelayMillis​(long retryDelayMillis)
      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 retries
      timeUnit - the delay time unit
      Returns:
      the proxy builder
      Throws:
      java.lang.NullPointerException - if the time unit is null
    • withRetryDelay

      public PrimaryBackupSessionClient.Builder withRetryDelay​(java.time.Duration retryDelay)
      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