Package org.apache.zookeeper.server
Class NettyServerCnxnFactory
java.lang.Object
org.apache.zookeeper.server.ServerCnxnFactory
org.apache.zookeeper.server.NettyServerCnxnFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
Allow client-server sockets to accept both SSL and plaintext connectionsFields inherited from class org.apache.zookeeper.server.ServerCnxnFactory
cnxns, login, maxCnxns, secure, zkServer, ZOOKEEPER_MAX_CONNECTION_DEFAULT, ZOOKEEPER_SERVER_CNXN_FACTORY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closeAll
(ServerCnxn.DisconnectReason reason) void
configure
(InetSocketAddress addr, int maxClientCnxns, int backlog, boolean secure) getAllConnectionInfo
(boolean brief) int
int
Maximum number of connections allowed from particular host (ip)int
io.netty.channel.Channel
int
The maximum queue length of the ZooKeeper server's socketvoid
join()
void
reconfigure
(InetSocketAddress addr) void
void
setAdvancedFlowControlEnabled
(boolean advancedFlowControlEnabled) void
setMaxClientCnxnsPerHost
(int max) Maximum number of connections allowed from particular host (ip)void
setOutstandingHandshakeLimit
(int limit) void
setSecure
(boolean secure) void
shutdown()
void
start()
void
startup
(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 Details
-
PORT_UNIFICATION_KEY
Allow client-server sockets to accept both SSL and plaintext connections- See Also:
-
EARLY_DROP_SECURE_CONNECTION_HANDSHAKES
- See Also:
-
OUTSTANDING_HANDSHAKE_LIMIT
- See Also:
-
NETTY_ADVANCED_FLOW_CONTROL
- See Also:
-
CLIENT_CERT_RELOAD_KEY
- See Also:
-
-
Method Details
-
setOutstandingHandshakeLimit
public void setOutstandingHandshakeLimit(int limit) -
closeAll
- Specified by:
closeAll
in classServerCnxnFactory
-
configure
public void configure(InetSocketAddress addr, int maxClientCnxns, int backlog, boolean secure) throws IOException - Specified by:
configure
in classServerCnxnFactory
- Throws:
IOException
-
getMaxClientCnxnsPerHost
public int getMaxClientCnxnsPerHost()Maximum number of connections allowed from particular host (ip)- Specified by:
getMaxClientCnxnsPerHost
in classServerCnxnFactory
-
setMaxClientCnxnsPerHost
public void setMaxClientCnxnsPerHost(int max) Maximum number of connections allowed from particular host (ip)- Specified by:
setMaxClientCnxnsPerHost
in classServerCnxnFactory
-
getSocketListenBacklog
public int getSocketListenBacklog()The maximum queue length of the ZooKeeper server's socket- Specified by:
getSocketListenBacklog
in classServerCnxnFactory
-
getLocalPort
public int getLocalPort()- Specified by:
getLocalPort
in classServerCnxnFactory
-
join
- Specified by:
join
in classServerCnxnFactory
- Throws:
InterruptedException
-
shutdown
public void shutdown()- Specified by:
shutdown
in classServerCnxnFactory
-
start
public void start()- Specified by:
start
in classServerCnxnFactory
-
reconfigure
- Specified by:
reconfigure
in classServerCnxnFactory
-
startup
public void startup(ZooKeeperServer zks, boolean startServer) throws IOException, InterruptedException - Specified by:
startup
in classServerCnxnFactory
- Throws:
IOException
InterruptedException
-
getConnections
- Specified by:
getConnections
in classServerCnxnFactory
-
getLocalAddress
- Specified by:
getLocalAddress
in classServerCnxnFactory
-
resetAllConnectionStats
public void resetAllConnectionStats()- Specified by:
resetAllConnectionStats
in classServerCnxnFactory
-
getAllConnectionInfo
- Specified by:
getAllConnectionInfo
in classServerCnxnFactory
-
setAdvancedFlowControlEnabled
public void setAdvancedFlowControlEnabled(boolean advancedFlowControlEnabled) -
setSecure
public void setSecure(boolean secure) -
getParentChannel
public io.netty.channel.Channel getParentChannel() -
getOutstandingHandshakeNum
public int getOutstandingHandshakeNum()
-