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.ObjectA builder to build retryable zookeeper client.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanallowReadOnlyMode(package private) RetryPolicyconnectRetryPolicy(package private) java.lang.StringconnectString(package private) RetryPolicyoperationRetryPolicy(package private) doublerequestRateLimit(package private) intretryExecThreadCount(package private) intsessionTimeoutMs(package private) StatsLoggerstatsLogger(package private) java.util.Set<org.apache.zookeeper.Watcher>watchers
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZooKeeperClient.BuilderallowReadOnlyMode(boolean allowReadOnlyMode)ZooKeeperClientbuild()ZooKeeperClient.BuilderconnectRetryPolicy(RetryPolicy retryPolicy)ZooKeeperClient.BuilderconnectString(java.lang.String connectString)ZooKeeperClient.BuilderoperationRetryPolicy(RetryPolicy retryPolicy)ZooKeeperClient.BuilderrequestRateLimit(double requestRateLimit)ZooKeeperClient.BuilderretryThreadCount(int numThreads)ZooKeeperClient.BuildersessionTimeoutMs(int sessionTimeoutMs)ZooKeeperClient.BuilderstatsLogger(StatsLogger statsLogger)ZooKeeperClient.Builderwatchers(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.IOExceptionorg.apache.zookeeper.KeeperExceptionjava.lang.InterruptedException
-
-