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 Summary
Fields 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.ServerCnxnFactory
cnxns, login, maxCnxns, secure, zkServer, ZOOKEEPER_MAX_CONNECTION_DEFAULT, ZOOKEEPER_SERVER_CNXN_FACTORY 
 - 
 
- 
Method Summary
All 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.ServerCnxnFactory
addSession, 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_KEY
public 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_HANDSHAKES
public static final String EARLY_DROP_SECURE_CONNECTION_HANDSHAKES
- See Also:
 - Constant Field Values
 
 
- 
OUTSTANDING_HANDSHAKE_LIMIT
public static final String OUTSTANDING_HANDSHAKE_LIMIT
- See Also:
 - Constant Field Values
 
 
- 
NETTY_ADVANCED_FLOW_CONTROL
public static final String NETTY_ADVANCED_FLOW_CONTROL
- See Also:
 - Constant Field Values
 
 
- 
CLIENT_CERT_RELOAD_KEY
public static final String CLIENT_CERT_RELOAD_KEY
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
setOutstandingHandshakeLimit
public void setOutstandingHandshakeLimit(int limit)
 
- 
closeAll
public void closeAll(ServerCnxn.DisconnectReason reason)
- Specified by:
 closeAllin classServerCnxnFactory
 
- 
configure
public void configure(InetSocketAddress addr, int maxClientCnxns, int backlog, boolean secure) throws IOException
- Specified by:
 configurein classServerCnxnFactory- Throws:
 IOException
 
- 
getMaxClientCnxnsPerHost
public int getMaxClientCnxnsPerHost()
Maximum number of connections allowed from particular host (ip)- Specified by:
 getMaxClientCnxnsPerHostin classServerCnxnFactory
 
- 
setMaxClientCnxnsPerHost
public void setMaxClientCnxnsPerHost(int max)
Maximum number of connections allowed from particular host (ip)- Specified by:
 setMaxClientCnxnsPerHostin classServerCnxnFactory
 
- 
getSocketListenBacklog
public int getSocketListenBacklog()
The maximum queue length of the ZooKeeper server's socket- Specified by:
 getSocketListenBacklogin classServerCnxnFactory
 
- 
getLocalPort
public int getLocalPort()
- Specified by:
 getLocalPortin classServerCnxnFactory
 
- 
join
public void join() throws InterruptedException- Specified by:
 joinin classServerCnxnFactory- Throws:
 InterruptedException
 
- 
shutdown
public void shutdown()
- Specified by:
 shutdownin classServerCnxnFactory
 
- 
start
public void start()
- Specified by:
 startin classServerCnxnFactory
 
- 
reconfigure
public void reconfigure(InetSocketAddress addr)
- Specified by:
 reconfigurein classServerCnxnFactory
 
- 
startup
public void startup(ZooKeeperServer zks, boolean startServer) throws IOException, InterruptedException
- Specified by:
 startupin classServerCnxnFactory- Throws:
 IOExceptionInterruptedException
 
- 
getConnections
public Iterable<ServerCnxn> getConnections()
- Specified by:
 getConnectionsin classServerCnxnFactory
 
- 
getLocalAddress
public InetSocketAddress getLocalAddress()
- Specified by:
 getLocalAddressin classServerCnxnFactory
 
- 
resetAllConnectionStats
public void resetAllConnectionStats()
- Specified by:
 resetAllConnectionStatsin classServerCnxnFactory
 
- 
getAllConnectionInfo
public Iterable<Map<String,Object>> getAllConnectionInfo(boolean brief)
- Specified by:
 getAllConnectionInfoin classServerCnxnFactory
 
- 
setAdvancedFlowControlEnabled
public void setAdvancedFlowControlEnabled(boolean advancedFlowControlEnabled)
 
- 
setSecure
public void setSecure(boolean secure)
 
- 
getParentChannel
public io.netty.channel.Channel getParentChannel()
 
- 
getOutstandingHandshakeNum
public int getOutstandingHandshakeNum()
 
 - 
 
 -