public static class RaftProtocol.Builder extends io.atomix.primitive.PrimitiveProtocol.Builder<RaftProtocol>
| Modifier and Type | Method and Description |
|---|---|
RaftProtocol |
build() |
RaftProtocol.Builder |
withCommunicationStrategy(CommunicationStrategy communicationStrategy)
Sets the communication strategy.
|
RaftProtocol.Builder |
withExecutor(Executor executor)
Sets the executor with which to complete proxy futures.
|
RaftProtocol.Builder |
withMaxRetries(int maxRetries)
Sets the maximum number of retries before an operation can be failed.
|
RaftProtocol.Builder |
withMaxTimeout(Duration maxTimeout)
Sets the maximum session timeout.
|
RaftProtocol.Builder |
withMinTimeout(Duration minTimeout)
Sets the minimum session timeout.
|
RaftProtocol.Builder |
withReadConsistency(ReadConsistency readConsistency)
Sets the read consistency level.
|
RaftProtocol.Builder |
withRecoveryStrategy(io.atomix.primitive.Recovery recoveryStrategy)
Sets the recovery strategy.
|
RaftProtocol.Builder |
withRetryDelay(Duration retryDelay)
Sets the operation retry delay.
|
RaftProtocol.Builder |
withRetryDelay(long retryDelay,
TimeUnit timeUnit)
Sets the operation retry delay.
|
RaftProtocol.Builder |
withRetryDelayMillis(long retryDelayMillis)
Sets the operation retry delay.
|
public RaftProtocol.Builder withMinTimeout(Duration minTimeout)
minTimeout - the minimum session timeoutpublic RaftProtocol.Builder withMaxTimeout(Duration maxTimeout)
maxTimeout - the maximum session timeoutpublic RaftProtocol.Builder withReadConsistency(ReadConsistency readConsistency)
readConsistency - the read consistency levelpublic RaftProtocol.Builder withCommunicationStrategy(CommunicationStrategy communicationStrategy)
communicationStrategy - the communication strategypublic RaftProtocol.Builder withRecoveryStrategy(io.atomix.primitive.Recovery recoveryStrategy)
recoveryStrategy - the recovery strategypublic RaftProtocol.Builder withMaxRetries(int maxRetries)
maxRetries - the maximum number of retries before an operation can be failedpublic RaftProtocol.Builder withRetryDelayMillis(long retryDelayMillis)
retryDelayMillis - the delay between operation retries in millisecondspublic RaftProtocol.Builder withRetryDelay(long retryDelay, TimeUnit timeUnit)
retryDelay - the delay between operation retriestimeUnit - the delay time unitNullPointerException - if the time unit is nullpublic RaftProtocol.Builder withRetryDelay(Duration retryDelay)
retryDelay - the delay between operation retriesNullPointerException - if the delay is nullpublic RaftProtocol.Builder withExecutor(Executor executor)
executor - The executor with which to complete proxy futures.NullPointerException - if the executor is nullpublic RaftProtocol build()
Copyright © 2013–2018. All rights reserved.