Package org.apache.zookeeper.server
Class NettyServerCnxnFactory
- java.lang.Object
- 
- org.apache.zookeeper.server.ServerCnxnFactory
- 
- org.apache.zookeeper.server.NettyServerCnxnFactory
 
 
- 
 public class NettyServerCnxnFactory extends ServerCnxnFactory 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringCLIENT_CERT_RELOAD_KEYstatic StringEARLY_DROP_SECURE_CONNECTION_HANDSHAKESstatic StringNETTY_ADVANCED_FLOW_CONTROLstatic StringOUTSTANDING_HANDSHAKE_LIMITstatic StringPORT_UNIFICATION_KEYAllow client-server sockets to accept both SSL and plaintext connections- 
Fields inherited from class org.apache.zookeeper.server.ServerCnxnFactorycnxns, login, maxCnxns, saslServerCallbackHandler, secure, zkServer, ZOOKEEPER_MAX_CONNECTION_DEFAULT, ZOOKEEPER_SERVER_CNXN_FACTORY
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseAll(ServerCnxn.DisconnectReason reason)voidconfigure(InetSocketAddress addr, int maxClientCnxns, int backlog, boolean secure)Iterable<Map<String,Object>>getAllConnectionInfo(boolean brief)Iterable<ServerCnxn>getConnections()InetSocketAddressgetLocalAddress()intgetLocalPort()intgetMaxClientCnxnsPerHost()Maximum number of connections allowed from particular host (ip)intgetOutstandingHandshakeNum()io.netty.channel.ChannelgetParentChannel()intgetSocketListenBacklog()The maximum queue length of the ZooKeeper server's socketvoidjoin()voidreconfigure(InetSocketAddress addr)voidresetAllConnectionStats()voidsetAdvancedFlowControlEnabled(boolean advancedFlowControlEnabled)voidsetMaxClientCnxnsPerHost(int max)Maximum number of connections allowed from particular host (ip)voidsetOutstandingHandshakeLimit(int limit)voidsetSecure(boolean secure)voidshutdown()voidstart()voidstartup(ZooKeeperServer zks, boolean startServer)- 
Methods inherited from class org.apache.zookeeper.server.ServerCnxnFactoryaddSession, closeSession, configure, configure, configureSaslLogin, createFactory, createFactory, createFactory, createFactory, createFactory, getMaxCnxns, getNumAliveConnections, getUserName, getZooKeeperServer, initMaxCnxns, isSecure, limitTotalNumberOfCnxns, registerConnection, removeCnxnFromSessionMap, setZooKeeperServer, startup, unregisterConnection
 
- 
 
- 
- 
- 
Field Detail- 
PORT_UNIFICATION_KEYpublic static final String PORT_UNIFICATION_KEY Allow client-server sockets to accept both SSL and plaintext connections- See Also:
- Constant Field Values
 
 - 
EARLY_DROP_SECURE_CONNECTION_HANDSHAKESpublic static final String EARLY_DROP_SECURE_CONNECTION_HANDSHAKES - See Also:
- Constant Field Values
 
 - 
OUTSTANDING_HANDSHAKE_LIMITpublic static final String OUTSTANDING_HANDSHAKE_LIMIT - See Also:
- Constant Field Values
 
 - 
NETTY_ADVANCED_FLOW_CONTROLpublic static final String NETTY_ADVANCED_FLOW_CONTROL - See Also:
- Constant Field Values
 
 - 
CLIENT_CERT_RELOAD_KEYpublic static final String CLIENT_CERT_RELOAD_KEY - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setOutstandingHandshakeLimitpublic void setOutstandingHandshakeLimit(int limit) 
 - 
closeAllpublic void closeAll(ServerCnxn.DisconnectReason reason) - Specified by:
- closeAllin class- ServerCnxnFactory
 
 - 
configurepublic void configure(InetSocketAddress addr, int maxClientCnxns, int backlog, boolean secure) throws IOException - Specified by:
- configurein class- ServerCnxnFactory
- Throws:
- IOException
 
 - 
getMaxClientCnxnsPerHostpublic int getMaxClientCnxnsPerHost() Maximum number of connections allowed from particular host (ip)- Specified by:
- getMaxClientCnxnsPerHostin class- ServerCnxnFactory
 
 - 
setMaxClientCnxnsPerHostpublic void setMaxClientCnxnsPerHost(int max) Maximum number of connections allowed from particular host (ip)- Specified by:
- setMaxClientCnxnsPerHostin class- ServerCnxnFactory
 
 - 
getSocketListenBacklogpublic int getSocketListenBacklog() The maximum queue length of the ZooKeeper server's socket- Specified by:
- getSocketListenBacklogin class- ServerCnxnFactory
 
 - 
getLocalPortpublic int getLocalPort() - Specified by:
- getLocalPortin class- ServerCnxnFactory
 
 - 
joinpublic void join() throws InterruptedException- Specified by:
- joinin class- ServerCnxnFactory
- Throws:
- InterruptedException
 
 - 
shutdownpublic void shutdown() - Specified by:
- shutdownin class- ServerCnxnFactory
 
 - 
startpublic void start() - Specified by:
- startin class- ServerCnxnFactory
 
 - 
reconfigurepublic void reconfigure(InetSocketAddress addr) - Specified by:
- reconfigurein class- ServerCnxnFactory
 
 - 
startuppublic void startup(ZooKeeperServer zks, boolean startServer) throws IOException, InterruptedException - Specified by:
- startupin class- ServerCnxnFactory
- Throws:
- IOException
- InterruptedException
 
 - 
getConnectionspublic Iterable<ServerCnxn> getConnections() - Specified by:
- getConnectionsin class- ServerCnxnFactory
 
 - 
getLocalAddresspublic InetSocketAddress getLocalAddress() - Specified by:
- getLocalAddressin class- ServerCnxnFactory
 
 - 
resetAllConnectionStatspublic void resetAllConnectionStats() - Specified by:
- resetAllConnectionStatsin class- ServerCnxnFactory
 
 - 
getAllConnectionInfopublic Iterable<Map<String,Object>> getAllConnectionInfo(boolean brief) - Specified by:
- getAllConnectionInfoin class- ServerCnxnFactory
 
 - 
setAdvancedFlowControlEnabledpublic void setAdvancedFlowControlEnabled(boolean advancedFlowControlEnabled) 
 - 
setSecurepublic void setSecure(boolean secure) 
 - 
getParentChannelpublic io.netty.channel.Channel getParentChannel() 
 - 
getOutstandingHandshakeNumpublic int getOutstandingHandshakeNum() 
 
- 
 
-