Class MultiPrimaryProtocolBuilder

java.lang.Object
io.atomix.primitive.protocol.PrimitiveProtocolBuilder<MultiPrimaryProtocolBuilder,​MultiPrimaryProtocolConfig,​MultiPrimaryProtocol>
io.atomix.protocols.backup.MultiPrimaryProtocolBuilder
All Implemented Interfaces:
io.atomix.utils.Builder<MultiPrimaryProtocol>

public class MultiPrimaryProtocolBuilder
extends io.atomix.primitive.protocol.PrimitiveProtocolBuilder<MultiPrimaryProtocolBuilder,​MultiPrimaryProtocolConfig,​MultiPrimaryProtocol>
Multi-primary protocol builder.
  • Method Details

    • withPartitioner

      public MultiPrimaryProtocolBuilder withPartitioner​(io.atomix.primitive.partition.Partitioner<java.lang.String> partitioner)
      Sets the protocol partitioner.
      Parameters:
      partitioner - the protocol partitioner
      Returns:
      the protocol builder
    • withConsistency

      public MultiPrimaryProtocolBuilder withConsistency​(io.atomix.primitive.Consistency consistency)
      Sets the protocol consistency model.
      Parameters:
      consistency - the protocol consistency model
      Returns:
      the protocol builder
    • withReplication

      public MultiPrimaryProtocolBuilder withReplication​(io.atomix.primitive.Replication replication)
      Sets the protocol replication strategy.
      Parameters:
      replication - the protocol replication strategy
      Returns:
      the protocol builder
    • withRecovery

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

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

      public MultiPrimaryProtocolBuilder 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 MultiPrimaryProtocolBuilder withRetryDelayMillis​(long retryDelayMillis)
      Sets the operation retry delay.
      Parameters:
      retryDelayMillis - the delay between operation retries in milliseconds
      Returns:
      the proxy builder
    • withRetryDelay

      public MultiPrimaryProtocolBuilder 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 MultiPrimaryProtocolBuilder 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
    • build

      public MultiPrimaryProtocol build()