public class NIOServerCnxnFactory extends ServerCnxnFactory implements java.lang.Runnable
ServerCnxnFactory.PacketProcessorcnxns, login, saslServerCallbackHandler, zkServer, ZOOKEEPER_SERVER_CNXN_FACTORY| Constructor and Description |
|---|
NIOServerCnxnFactory()
Construct a new server connection factory which will accept an unlimited number
of concurrent connections from each client (up to the file descriptor
limits of the operating system).
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeAll()
clear all the connections in the selector
|
void |
closeSession(long sessionId) |
void |
configure(java.net.InetSocketAddress addr,
int maxcc) |
protected NIOServerCnxn |
createConnection(java.nio.channels.SocketChannel sock,
java.nio.channels.SelectionKey sk) |
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 |
run() |
void |
setMaxClientCnxnsPerHost(int max)
Maximum number of connections allowed from particular host (ip)
|
void |
shutdown() |
void |
start() |
void |
startup(ZooKeeperServer zks) |
configureSaslLogin, createFactory, createFactory, createFactory, getNumAliveConnections, registerConnection, setZooKeeperServer, unregisterConnectionpublic NIOServerCnxnFactory()
throws java.io.IOException
java.io.IOExceptionpublic void configure(java.net.InetSocketAddress addr,
int maxcc)
throws java.io.IOException
configure in class ServerCnxnFactoryjava.io.IOExceptionpublic int getMaxClientCnxnsPerHost()
getMaxClientCnxnsPerHost in class ServerCnxnFactorypublic void setMaxClientCnxnsPerHost(int max)
setMaxClientCnxnsPerHost in class ServerCnxnFactorypublic void start()
start in class ServerCnxnFactorypublic void startup(ZooKeeperServer zks) throws java.io.IOException, java.lang.InterruptedException
startup in class ServerCnxnFactoryjava.io.IOExceptionjava.lang.InterruptedExceptionpublic java.net.InetSocketAddress getLocalAddress()
getLocalAddress in class ServerCnxnFactorypublic int getLocalPort()
getLocalPort in class ServerCnxnFactoryprotected NIOServerCnxn createConnection(java.nio.channels.SocketChannel sock, java.nio.channels.SelectionKey sk) throws java.io.IOException
java.io.IOExceptionpublic void run()
run in interface java.lang.Runnablepublic void closeAll()
closeAll in class ServerCnxnFactorypublic void shutdown()
shutdown in class ServerCnxnFactorypublic void closeSession(long sessionId)
closeSession in class ServerCnxnFactorypublic void join()
throws java.lang.InterruptedException
join in class ServerCnxnFactoryjava.lang.InterruptedExceptionpublic java.lang.Iterable<ServerCnxn> getConnections()
getConnections in class ServerCnxnFactoryCopyright © 2016 The Apache Software Foundation