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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.zookeeper.server.ServerCnxnFactory
ServerCnxnFactory.PacketProcessor
-
-
Field Summary
-
Fields inherited from class org.apache.zookeeper.server.ServerCnxnFactory
cnxns, login, saslServerCallbackHandler, sessionMap, zkServer, ZOOKEEPER_SERVER_CNXN_FACTORY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseAll()voidcloseSession(long sessionId)voidconfigure(java.net.InetSocketAddress addr, int maxClientCnxns)java.lang.Iterable<ServerCnxn>getConnections()java.net.InetSocketAddressgetLocalAddress()intgetLocalPort()intgetMaxClientCnxnsPerHost()Maximum number of connections allowed from particular host (ip)voidjoin()voidremoveCnxn(ServerCnxn cnxn)voidsetMaxClientCnxnsPerHost(int max)Maximum number of connections allowed from particular host (ip)voidshutdown()voidstart()voidstartup(ZooKeeperServer zks)-
Methods inherited from class org.apache.zookeeper.server.ServerCnxnFactory
addSession, configureSaslLogin, createFactory, createFactory, createFactory, getNumAliveConnections, registerConnection, setZooKeeperServer, unregisterConnection
-
-
-
-
Method Detail
-
closeAll
public void closeAll()
- Specified by:
closeAllin classServerCnxnFactory
-
closeSession
public void closeSession(long sessionId)
- Specified by:
closeSessionin classServerCnxnFactory
-
configure
public void configure(java.net.InetSocketAddress addr, int maxClientCnxns) throws java.io.IOException- Specified by:
configurein classServerCnxnFactory- Throws:
java.io.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
-
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPortin classServerCnxnFactory
-
join
public void join() throws java.lang.InterruptedException- Specified by:
joinin classServerCnxnFactory- Throws:
java.lang.InterruptedException
-
shutdown
public void shutdown()
- Specified by:
shutdownin classServerCnxnFactory
-
start
public void start()
- Specified by:
startin classServerCnxnFactory
-
startup
public void startup(ZooKeeperServer zks) throws java.io.IOException, java.lang.InterruptedException
- Specified by:
startupin classServerCnxnFactory- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
getConnections
public java.lang.Iterable<ServerCnxn> getConnections()
- Specified by:
getConnectionsin classServerCnxnFactory
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
- Specified by:
getLocalAddressin classServerCnxnFactory
-
removeCnxn
public void removeCnxn(ServerCnxn cnxn)
-
-