- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.statsLogger()
方法的一些代码示例,展示了ZooKeeperClientBuilder.statsLogger()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperClientBuilder.statsLogger()
方法的具体详情如下:
包路径:com.twitter.distributedlog.ZooKeeperClientBuilder
类名称:ZooKeeperClientBuilder
方法名:statsLogger
[英]Build zookeeper client with given stats logger statsLogger.
[中]使用给定的统计记录器statsLogger构建zookeeper客户端。
代码示例来源:origin: twitter/distributedlog
/**
* Return a zookeeper client builder for testing.
*
* @return a zookeeper client builder
*/
public static ZooKeeperClientBuilder newBuilder() {
return ZooKeeperClientBuilder.newBuilder()
.retryPolicy(RetryPolicyUtils.DEFAULT_INFINITE_RETRY_POLICY)
.connectionTimeoutMs(10000)
.sessionTimeoutMs(60000)
.zkAclId(null)
.statsLogger(NullStatsLogger.INSTANCE);
}
代码示例来源:origin: twitter/distributedlog
.uri(uri)
.retryPolicy(retryPolicy)
.statsLogger(statsLogger.scope("dlzk_dlm_writer_shared"));
this.ownWriterZKC = true;
} else {
.retryPolicy(retryPolicy)
.zkAclId(conf.getZkAclId())
.statsLogger(statsLogger.scope("dlzk_dlm_reader_shared"));
this.ownReaderZKC = true;
代码示例来源:origin: twitter/distributedlog
private static ZooKeeperClientBuilder createDLZKClientBuilder(String zkcName,
DistributedLogConfiguration conf,
String zkServers,
StatsLogger statsLogger) {
RetryPolicy retryPolicy = null;
if (conf.getZKNumRetries() > 0) {
retryPolicy = new BoundExponentialBackoffRetryPolicy(
conf.getZKRetryBackoffStartMillis(),
conf.getZKRetryBackoffMaxMillis(), conf.getZKNumRetries());
}
ZooKeeperClientBuilder builder = ZooKeeperClientBuilder.newBuilder()
.name(zkcName)
.sessionTimeoutMs(conf.getZKSessionTimeoutMilliseconds())
.retryThreadCount(conf.getZKClientNumberRetryThreads())
.requestRateLimit(conf.getZKRequestRateLimit())
.zkServers(zkServers)
.retryPolicy(retryPolicy)
.statsLogger(statsLogger)
.zkAclId(conf.getZkAclId());
LOG.info("Created shared zooKeeper client builder {}: zkServers = {}, numRetries = {}, sessionTimeout = {}, retryBackoff = {},"
+ " maxRetryBackoff = {}, zkAclId = {}.", new Object[] { zkcName, zkServers, conf.getZKNumRetries(),
conf.getZKSessionTimeoutMilliseconds(), conf.getZKRetryBackoffStartMillis(),
conf.getZKRetryBackoffMaxMillis(), conf.getZkAclId() });
return builder;
}
代码示例来源:origin: twitter/distributedlog
private static ZooKeeperClientBuilder createBKZKClientBuilder(String zkcName,
DistributedLogConfiguration conf,
String zkServers,
StatsLogger statsLogger) {
RetryPolicy retryPolicy = null;
if (conf.getZKNumRetries() > 0) {
retryPolicy = new BoundExponentialBackoffRetryPolicy(
conf.getBKClientZKRetryBackoffStartMillis(),
conf.getBKClientZKRetryBackoffMaxMillis(),
conf.getBKClientZKNumRetries());
}
ZooKeeperClientBuilder builder = ZooKeeperClientBuilder.newBuilder()
.name(zkcName)
.sessionTimeoutMs(conf.getBKClientZKSessionTimeoutMilliSeconds())
.retryThreadCount(conf.getZKClientNumberRetryThreads())
.requestRateLimit(conf.getBKClientZKRequestRateLimit())
.zkServers(zkServers)
.retryPolicy(retryPolicy)
.statsLogger(statsLogger)
.zkAclId(conf.getZkAclId());
LOG.info("Created shared zooKeeper client builder {}: zkServers = {}, numRetries = {}, sessionTimeout = {}, retryBackoff = {},"
+ " maxRetryBackoff = {}, zkAclId = {}.", new Object[] { zkcName, zkServers, conf.getBKClientZKNumRetries(),
conf.getBKClientZKSessionTimeoutMilliSeconds(), conf.getBKClientZKRetryBackoffStartMillis(),
conf.getBKClientZKRetryBackoffMaxMillis(), conf.getZkAclId() });
return builder;
}
代码示例来源:origin: twitter/distributedlog
/**
* Create a zookeeper client builder with provided <i>conf</i> for testing.
*
* @param conf distributedlog configuration
* @return zookeeper client builder
*/
public static ZooKeeperClientBuilder newBuilder(DistributedLogConfiguration conf) {
return ZooKeeperClientBuilder.newBuilder()
.retryPolicy(RetryPolicyUtils.DEFAULT_INFINITE_RETRY_POLICY)
.sessionTimeoutMs(conf.getZKSessionTimeoutMilliseconds())
.zkAclId(conf.getZkAclId())
.retryThreadCount(conf.getZKClientNumberRetryThreads())
.requestRateLimit(conf.getZKRequestRateLimit())
.statsLogger(NullStatsLogger.INSTANCE);
}
}
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder类的一些代码示例,展示了ZooKeeperClientBuilder类的具体用法。
本文整理了Java中com.twitter.distributedlog.metadata.ZkMetadataResolver类的一些代码示例,展示了ZkMetadataResolver类的具体用法
本文整理了Java中com.twitter.distributedlog.zk.ZKVersionedSetOp类的一些代码示例,展示了ZKVersionedSetOp类的具体用法。这些代码示例主要来
本文整理了Java中com.twitter.distributedlog.lock.ZKSessionLock类的一些代码示例,展示了ZKSessionLock类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中com.twitter.distributedlog.zk.ZKWatcherManager类的一些代码示例,展示了ZKWatcherManager类的具体用法。这些代码示例主要来
本文整理了Java中com.twitter.distributedlog.acl.ZKAccessControlManager类的一些代码示例,展示了ZKAccessControlManager类的具
本文整理了Java中com.twitter.distributedlog.impl.ZKNamespaceWatcher类的一些代码示例,展示了ZKNamespaceWatcher类的具体用法。这些代
本文整理了Java中com.twitter.distributedlog.exceptions.ZKException类的一些代码示例,展示了ZKException类的具体用法。这些代码示例主要来源于
本文整理了Java中com.twitter.distributedlog.impl.ZKLogMetadataStore类的一些代码示例,展示了ZKLogMetadataStore类的具体用法。这些代
本文整理了Java中com.twitter.distributedlog.acl.ZKAccessControl类的一些代码示例,展示了ZKAccessControl类的具体用法。这些代码示例主要来源
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.retryPolicy()方法的一些代码示例,展示了ZooKeeperClien
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.retryThreadCount()方法的一些代码示例,展示了ZooKeeper
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.statsLogger()方法的一些代码示例,展示了ZooKeeperClien
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.zkServers()方法的一些代码示例,展示了ZooKeeperClientB
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.uri()方法的一些代码示例,展示了ZooKeeperClientBuilder
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.build()方法的一些代码示例,展示了ZooKeeperClientBuild
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.name()方法的一些代码示例,展示了ZooKeeperClientBuilde
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.zkAclId()方法的一些代码示例,展示了ZooKeeperClientBui
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.requestRateLimit()方法的一些代码示例,展示了ZooKeeper
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.newBuilder()方法的一些代码示例,展示了ZooKeeperClient
我是一名优秀的程序员,十分优秀!