本文整理了Java中org.apache.zookeeper.server.ZooKeeperServer.getServerCnxnFactory()
方法的一些代码示例,展示了ZooKeeperServer.getServerCnxnFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperServer.getServerCnxnFactory()
方法的具体详情如下:
包路径:org.apache.zookeeper.server.ZooKeeperServer
类名称:ZooKeeperServer
方法名:getServerCnxnFactory
暂无
代码示例来源:origin: org.apache.zookeeper/zookeeper
public int getMaxClientCnxnsPerHost() {
ServerCnxnFactory fac = zks.getServerCnxnFactory();
if (fac == null) {
return -1;
}
return fac.getMaxClientCnxnsPerHost();
}
代码示例来源:origin: org.apache.zookeeper/zookeeper
public void setMaxClientCnxnsPerHost(int max) {
// if fac is null the exception will be propagated to the client
zks.getServerCnxnFactory().setMaxClientCnxnsPerHost(max);
}
代码示例来源:origin: apache/zookeeper
@Override
public CommandResponse run(ZooKeeperServer zkServer, Map<String, String> kwargs) {
CommandResponse response = initializeResponse();
zkServer.getServerCnxnFactory().resetAllConnectionStats();
return response;
}
}
代码示例来源:origin: apache/zookeeper
@Override
public CommandResponse run(ZooKeeperServer zkServer, Map<String, String> kwargs) {
CommandResponse response = super.run(zkServer, kwargs);
response.put("connections", zkServer.getServerCnxnFactory().getAllConnectionInfo(true));
return response;
}
}
代码示例来源:origin: apache/zookeeper
@Override
public CommandResponse run(ZooKeeperServer zkServer, Map<String, String> kwargs) {
CommandResponse response = initializeResponse();
ServerCnxnFactory serverCnxnFactory = zkServer.getServerCnxnFactory();
if (serverCnxnFactory != null) {
response.put("connections", serverCnxnFactory.getAllConnectionInfo(false));
} else {
response.put("connections", Collections.emptyList());
}
ServerCnxnFactory secureServerCnxnFactory = zkServer.getSecureServerCnxnFactory();
if (secureServerCnxnFactory != null) {
response.put("secure_connections", secureServerCnxnFactory.getAllConnectionInfo(false));
} else {
response.put("secure_connections", Collections.emptyList());
}
return response;
}
}
代码示例来源:origin: org.apache.zookeeper/zookeeper
ServerCnxnFactory scxn = zks.getServerCnxnFactory();
代码示例来源:origin: org.apache.hadoop/zookeeper
public void setMaxClientCnxnsPerHost(int max) {
// if fac is null the exception will be propagated to the client
zks.getServerCnxnFactory().maxClientCnxns = max;
}
代码示例来源:origin: org.apache.hadoop/zookeeper
public int getMaxClientCnxnsPerHost() {
NIOServerCnxn.Factory fac = zks.getServerCnxnFactory();
if (fac == null) {
return -1;
}
return fac.getMaxClientCnxns();
}
代码示例来源:origin: org.apache.pulsar/pulsar-zookeeper
@Override
public double get() {
ServerCnxnFactory cnxFactory = zkServer.getServerCnxnFactory();
if (cnxFactory != null) {
return cnxFactory.getNumAliveConnections();
} else {
return -1;
}
}
}).register();
代码示例来源:origin: org.apache.hadoop/zookeeper
Factory scxn = zks.getServerCnxnFactory();
内容来源于网络,如有侵权,请联系作者删除!