Package org.apache.bookkeeper.zookeeper
Class ZooKeeperClient.Builder
- java.lang.Object
-
- org.apache.bookkeeper.zookeeper.ZooKeeperClient.Builder
-
- Enclosing class:
- ZooKeeperClient
public static class ZooKeeperClient.Builder extends java.lang.Object
A builder to build retryable zookeeper client.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
allowReadOnlyMode
(package private) RetryPolicy
connectRetryPolicy
(package private) java.lang.String
connectString
(package private) RetryPolicy
operationRetryPolicy
(package private) double
requestRateLimit
(package private) int
retryExecThreadCount
(package private) int
sessionTimeoutMs
(package private) StatsLogger
statsLogger
(package private) java.util.Set<org.apache.zookeeper.Watcher>
watchers
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZooKeeperClient.Builder
allowReadOnlyMode(boolean allowReadOnlyMode)
ZooKeeperClient
build()
ZooKeeperClient.Builder
connectRetryPolicy(RetryPolicy retryPolicy)
ZooKeeperClient.Builder
connectString(java.lang.String connectString)
ZooKeeperClient.Builder
operationRetryPolicy(RetryPolicy retryPolicy)
ZooKeeperClient.Builder
requestRateLimit(double requestRateLimit)
ZooKeeperClient.Builder
retryThreadCount(int numThreads)
ZooKeeperClient.Builder
sessionTimeoutMs(int sessionTimeoutMs)
ZooKeeperClient.Builder
statsLogger(StatsLogger statsLogger)
ZooKeeperClient.Builder
watchers(java.util.Set<org.apache.zookeeper.Watcher> watchers)
-
-
-
Field Detail
-
connectString
java.lang.String connectString
-
sessionTimeoutMs
int sessionTimeoutMs
-
watchers
java.util.Set<org.apache.zookeeper.Watcher> watchers
-
connectRetryPolicy
RetryPolicy connectRetryPolicy
-
operationRetryPolicy
RetryPolicy operationRetryPolicy
-
statsLogger
StatsLogger statsLogger
-
retryExecThreadCount
int retryExecThreadCount
-
requestRateLimit
double requestRateLimit
-
allowReadOnlyMode
boolean allowReadOnlyMode
-
-
Method Detail
-
connectString
public ZooKeeperClient.Builder connectString(java.lang.String connectString)
-
sessionTimeoutMs
public ZooKeeperClient.Builder sessionTimeoutMs(int sessionTimeoutMs)
-
watchers
public ZooKeeperClient.Builder watchers(java.util.Set<org.apache.zookeeper.Watcher> watchers)
-
connectRetryPolicy
public ZooKeeperClient.Builder connectRetryPolicy(RetryPolicy retryPolicy)
-
operationRetryPolicy
public ZooKeeperClient.Builder operationRetryPolicy(RetryPolicy retryPolicy)
-
statsLogger
public ZooKeeperClient.Builder statsLogger(StatsLogger statsLogger)
-
requestRateLimit
public ZooKeeperClient.Builder requestRateLimit(double requestRateLimit)
-
retryThreadCount
public ZooKeeperClient.Builder retryThreadCount(int numThreads)
-
allowReadOnlyMode
public ZooKeeperClient.Builder allowReadOnlyMode(boolean allowReadOnlyMode)
-
build
public ZooKeeperClient build() throws java.io.IOException, org.apache.zookeeper.KeeperException, java.lang.InterruptedException
- Throws:
java.io.IOException
org.apache.zookeeper.KeeperException
java.lang.InterruptedException
-
-