| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
RaftProxy.Builder |
withCommunicationStrategy(CommunicationStrategy communicationStrategy)
Sets the session's communication strategy.
|
RaftProxy.Builder |
withExecutor(Executor executor)
Sets the executor with which to complete proxy futures.
|
RaftProxy.Builder |
withMaxRetries(int maxRetries)
Sets the maximum number of retries before an operation can be failed.
|
RaftProxy.Builder |
withMaxTimeout(Duration timeout)
Sets the session timeout.
|
RaftProxy.Builder |
withMaxTimeout(long timeoutMillis)
Sets the session timeout.
|
RaftProxy.Builder |
withMinTimeout(Duration timeout)
Sets the session timeout.
|
RaftProxy.Builder |
withMinTimeout(long timeoutMillis)
Sets the session timeout.
|
RaftProxy.Builder |
withName(String name)
Sets the session name.
|
RaftProxy.Builder |
withReadConsistency(ReadConsistency consistency)
Sets the session's read consistency level.
|
RaftProxy.Builder |
withRecoveryStrategy(RecoveryStrategy recoveryStrategy)
Sets the session recovery strategy.
|
RaftProxy.Builder |
withRetryDelay(Duration retryDelay)
Sets the operation retry delay.
|
RaftProxy.Builder |
withRetryDelay(long retryDelay,
TimeUnit timeUnit)
Sets the operation retry delay.
|
RaftProxy.Builder |
withRetryDelayMillis(long retryDelayMillis)
Sets the operation retry delay.
|
RaftProxy.Builder |
withServiceType(ServiceType serviceType)
Sets the service type.
|
RaftProxy.Builder |
withServiceType(String serviceType)
Sets the service type.
|
RaftProxy.Builder |
withTimeout(Duration timeout)
Deprecated.
|
RaftProxy.Builder |
withTimeout(long timeoutMillis)
Deprecated.
|
public RaftProxy.Builder withName(String name)
name - The service name.public RaftProxy.Builder withServiceType(String serviceType)
serviceType - The service type.public RaftProxy.Builder withServiceType(ServiceType serviceType)
serviceType - The service type.public RaftProxy.Builder withReadConsistency(ReadConsistency consistency)
consistency - the session's read consistency levelpublic RaftProxy.Builder withCommunicationStrategy(CommunicationStrategy communicationStrategy)
communicationStrategy - The session's communication strategy.NullPointerException - if the communication strategy is nullpublic RaftProxy.Builder withMaxRetries(int maxRetries)
maxRetries - the maximum number of retries before an operation can be failedpublic RaftProxy.Builder withRetryDelayMillis(long retryDelayMillis)
retryDelayMillis - the delay between operation retries in millisecondspublic RaftProxy.Builder withRetryDelay(long retryDelay, TimeUnit timeUnit)
retryDelay - the delay between operation retriestimeUnit - the delay time unitNullPointerException - if the time unit is nullpublic RaftProxy.Builder withRetryDelay(Duration retryDelay)
retryDelay - the delay between operation retriesNullPointerException - if the delay is nullpublic RaftProxy.Builder withRecoveryStrategy(RecoveryStrategy recoveryStrategy)
recoveryStrategy - the session recovery strategyNullPointerException - if the strategy is nullpublic RaftProxy.Builder withMinTimeout(long timeoutMillis)
timeoutMillis - The session timeout.IllegalArgumentException - if the session timeout is not positivepublic RaftProxy.Builder withMinTimeout(Duration timeout)
timeout - The session timeout.IllegalArgumentException - if the session timeout is not positiveNullPointerException - if the timeout is null@Deprecated public RaftProxy.Builder withTimeout(long timeoutMillis)
timeoutMillis - The session timeout.IllegalArgumentException - if the session timeout is not positive@Deprecated public RaftProxy.Builder withTimeout(Duration timeout)
timeout - The session timeout.IllegalArgumentException - if the session timeout is not positiveNullPointerException - if the timeout is nullpublic RaftProxy.Builder withMaxTimeout(long timeoutMillis)
timeoutMillis - The session timeout.IllegalArgumentException - if the session timeout is not positivepublic RaftProxy.Builder withMaxTimeout(Duration timeout)
timeout - The session timeout.IllegalArgumentException - if the session timeout is not positiveNullPointerException - if the timeout is nullpublic RaftProxy.Builder withExecutor(Executor executor)
executor - The executor with which to complete proxy futures.NullPointerException - if the executor is nullCopyright © 2013–2017. All rights reserved.