|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.apache.zookeeper.server.NIOServerCnxn.Factory
public static class NIOServerCnxn.Factory
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
NIOServerCnxn.Factory(java.net.InetSocketAddress addr)
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). |
|
NIOServerCnxn.Factory(java.net.InetSocketAddress addr,
int maxcc)
Constructs a new server connection factory where the number of concurrent connections from a single IP address is limited to maxcc (or unlimited if 0). |
Method Summary | |
---|---|
void |
clear()
Clear all the connections in the selector. |
protected NIOServerCnxn |
createConnection(java.nio.channels.SocketChannel sock,
java.nio.channels.SelectionKey sk)
|
java.net.InetSocketAddress |
getLocalAddress()
|
int |
getLocalPort()
|
int |
getMaxClientCnxns()
|
ZooKeeperServer |
getZooKeeperServer()
|
void |
run()
|
void |
setZooKeeperServer(ZooKeeperServer zks)
|
void |
shutdown()
|
void |
start()
|
void |
startup(ZooKeeperServer zks)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NIOServerCnxn.Factory(java.net.InetSocketAddress addr) throws java.io.IOException
port
-
java.io.IOException
public NIOServerCnxn.Factory(java.net.InetSocketAddress addr, int maxcc) throws java.io.IOException
port
- - the port to listen on for connections.maxcc
- - the number of concurrent connections allowed from a single client.
java.io.IOException
Method Detail |
---|
public void start()
start
in class java.lang.Thread
public void startup(ZooKeeperServer zks) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void setZooKeeperServer(ZooKeeperServer zks)
public ZooKeeperServer getZooKeeperServer()
public java.net.InetSocketAddress getLocalAddress()
public int getLocalPort()
public int getMaxClientCnxns()
protected NIOServerCnxn createConnection(java.nio.channels.SocketChannel sock, java.nio.channels.SelectionKey sk) throws java.io.IOException
java.io.IOException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void clear()
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |