public abstract static class RaftProxyClient.Builder extends Object implements io.atomix.utils.Builder<RaftProxyClient>
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
RaftProxyClient |
build()
Builds the proxy client.
|
abstract CompletableFuture<RaftProxyClient> |
buildAsync()
Returns a future to be completed once the proxy client has been connected.
|
RaftProxyClient.Builder |
withCommunicationStrategy(CommunicationStrategy communicationStrategy)
Sets the session's communication strategy.
|
RaftProxyClient.Builder |
withMaxRetries(int maxRetries)
Sets the maximum number of retries before an operation can be failed.
|
RaftProxyClient.Builder |
withMaxTimeout(Duration timeout)
Sets the session timeout.
|
RaftProxyClient.Builder |
withMaxTimeout(long timeoutMillis)
Sets the session timeout.
|
RaftProxyClient.Builder |
withMinTimeout(Duration timeout)
Sets the session timeout.
|
RaftProxyClient.Builder |
withMinTimeout(long timeoutMillis)
Sets the session timeout.
|
RaftProxyClient.Builder |
withName(String name)
Sets the session name.
|
RaftProxyClient.Builder |
withReadConsistency(ReadConsistency consistency)
Sets the session's read consistency level.
|
RaftProxyClient.Builder |
withRecoveryStrategy(RecoveryStrategy recoveryStrategy)
Sets the session recovery strategy.
|
RaftProxyClient.Builder |
withRetryDelay(Duration retryDelay)
Sets the operation retry delay.
|
RaftProxyClient.Builder |
withRetryDelay(long retryDelay,
TimeUnit timeUnit)
Sets the operation retry delay.
|
RaftProxyClient.Builder |
withRetryDelayMillis(long retryDelayMillis)
Sets the operation retry delay.
|
RaftProxyClient.Builder |
withServiceType(ServiceType serviceType)
Sets the service type.
|
RaftProxyClient.Builder |
withServiceType(String serviceType)
Sets the service type.
|
RaftProxyClient.Builder |
withTimeout(Duration timeout)
Deprecated.
|
RaftProxyClient.Builder |
withTimeout(long timeoutMillis)
Deprecated.
|
public RaftProxyClient.Builder withName(String name)
name - The service name.public RaftProxyClient.Builder withServiceType(String serviceType)
serviceType - The service type.public RaftProxyClient.Builder withServiceType(ServiceType serviceType)
serviceType - The service type.public RaftProxyClient.Builder withReadConsistency(ReadConsistency consistency)
consistency - the session's read consistency levelpublic RaftProxyClient.Builder withCommunicationStrategy(CommunicationStrategy communicationStrategy)
communicationStrategy - The session's communication strategy.NullPointerException - if the communication strategy is nullpublic RaftProxyClient.Builder withMaxRetries(int maxRetries)
maxRetries - the maximum number of retries before an operation can be failedpublic RaftProxyClient.Builder withRetryDelayMillis(long retryDelayMillis)
retryDelayMillis - the delay between operation retries in millisecondspublic RaftProxyClient.Builder withRetryDelay(long retryDelay, TimeUnit timeUnit)
retryDelay - the delay between operation retriestimeUnit - the delay time unitNullPointerException - if the time unit is nullpublic RaftProxyClient.Builder withRetryDelay(Duration retryDelay)
retryDelay - the delay between operation retriesNullPointerException - if the delay is nullpublic RaftProxyClient.Builder withRecoveryStrategy(RecoveryStrategy recoveryStrategy)
recoveryStrategy - the session recovery strategyNullPointerException - if the strategy is nullpublic RaftProxyClient.Builder withMinTimeout(long timeoutMillis)
timeoutMillis - The session timeout.IllegalArgumentException - if the session timeout is not positivepublic RaftProxyClient.Builder withMinTimeout(Duration timeout)
timeout - The session timeout.IllegalArgumentException - if the session timeout is not positiveNullPointerException - if the timeout is null@Deprecated public RaftProxyClient.Builder withTimeout(long timeoutMillis)
timeoutMillis - The session timeout.IllegalArgumentException - if the session timeout is not positive@Deprecated public RaftProxyClient.Builder withTimeout(Duration timeout)
timeout - The session timeout.IllegalArgumentException - if the session timeout is not positiveNullPointerException - if the timeout is nullpublic RaftProxyClient.Builder withMaxTimeout(long timeoutMillis)
timeoutMillis - The session timeout.IllegalArgumentException - if the session timeout is not positivepublic RaftProxyClient.Builder withMaxTimeout(Duration timeout)
timeout - The session timeout.IllegalArgumentException - if the session timeout is not positiveNullPointerException - if the timeout is nullpublic RaftProxyClient build()
build in interface io.atomix.utils.Builder<RaftProxyClient>public abstract CompletableFuture<RaftProxyClient> buildAsync()
Copyright © 2013–2017. All rights reserved.