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 void
closeAll()
void
closeSession(long sessionId)
void
configure(java.net.InetSocketAddress addr, int maxClientCnxns)
java.lang.Iterable<ServerCnxn>
getConnections()
java.net.InetSocketAddress
getLocalAddress()
int
getLocalPort()
int
getMaxClientCnxnsPerHost()
Maximum number of connections allowed from particular host (ip)void
join()
void
removeCnxn(ServerCnxn cnxn)
void
setMaxClientCnxnsPerHost(int max)
Maximum number of connections allowed from particular host (ip)void
shutdown()
void
start()
void
startup(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:
closeAll
in classServerCnxnFactory
-
closeSession
public void closeSession(long sessionId)
- Specified by:
closeSession
in classServerCnxnFactory
-
configure
public void configure(java.net.InetSocketAddress addr, int maxClientCnxns) throws java.io.IOException
- Specified by:
configure
in classServerCnxnFactory
- Throws:
java.io.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
-
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPort
in classServerCnxnFactory
-
join
public void join() throws java.lang.InterruptedException
- Specified by:
join
in classServerCnxnFactory
- Throws:
java.lang.InterruptedException
-
shutdown
public void shutdown()
- Specified by:
shutdown
in classServerCnxnFactory
-
start
public void start()
- Specified by:
start
in classServerCnxnFactory
-
startup
public void startup(ZooKeeperServer zks) throws java.io.IOException, java.lang.InterruptedException
- Specified by:
startup
in classServerCnxnFactory
- Throws:
java.io.IOException
java.lang.InterruptedException
-
getConnections
public java.lang.Iterable<ServerCnxn> getConnections()
- Specified by:
getConnections
in classServerCnxnFactory
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
- Specified by:
getLocalAddress
in classServerCnxnFactory
-
removeCnxn
public void removeCnxn(ServerCnxn cnxn)
-
-