public abstract class ServerCnxnFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ServerCnxnFactory.PacketProcessor |
Modifier and Type | Field and Description |
---|---|
protected java.util.HashSet<ServerCnxn> |
cnxns |
Login |
login |
protected SaslServerCallbackHandler |
saslServerCallbackHandler |
protected ZooKeeperServer |
zkServer |
static java.lang.String |
ZOOKEEPER_SERVER_CNXN_FACTORY |
Constructor and Description |
---|
ServerCnxnFactory() |
Modifier and Type | Method and Description |
---|---|
abstract void |
closeAll() |
abstract void |
closeSession(long sessionId) |
abstract void |
configure(java.net.InetSocketAddress addr,
int maxClientCnxns) |
protected void |
configureSaslLogin()
Initialize the server SASL if specified.
|
static ServerCnxnFactory |
createFactory() |
static ServerCnxnFactory |
createFactory(java.net.InetSocketAddress addr,
int maxClientCnxns) |
static ServerCnxnFactory |
createFactory(int clientPort,
int maxClientCnxns) |
abstract java.lang.Iterable<ServerCnxn> |
getConnections() |
abstract java.net.InetSocketAddress |
getLocalAddress() |
abstract int |
getLocalPort() |
abstract int |
getMaxClientCnxnsPerHost()
Maximum number of connections allowed from particular host (ip)
|
int |
getNumAliveConnections() |
abstract void |
join() |
void |
registerConnection(ServerCnxn serverCnxn) |
abstract void |
setMaxClientCnxnsPerHost(int max)
Maximum number of connections allowed from particular host (ip)
|
void |
setZooKeeperServer(ZooKeeperServer zk) |
abstract void |
shutdown() |
abstract void |
start() |
abstract void |
startup(ZooKeeperServer zkServer) |
void |
unregisterConnection(ServerCnxn serverCnxn) |
public static final java.lang.String ZOOKEEPER_SERVER_CNXN_FACTORY
protected SaslServerCallbackHandler saslServerCallbackHandler
public Login login
protected ZooKeeperServer zkServer
protected final java.util.HashSet<ServerCnxn> cnxns
public abstract int getLocalPort()
public abstract java.lang.Iterable<ServerCnxn> getConnections()
public int getNumAliveConnections()
public abstract void closeSession(long sessionId)
public abstract void configure(java.net.InetSocketAddress addr, int maxClientCnxns) throws java.io.IOException
java.io.IOException
public abstract int getMaxClientCnxnsPerHost()
public abstract void setMaxClientCnxnsPerHost(int max)
public abstract void startup(ZooKeeperServer zkServer) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public abstract void join() throws java.lang.InterruptedException
java.lang.InterruptedException
public abstract void shutdown()
public abstract void start()
public final void setZooKeeperServer(ZooKeeperServer zk)
public abstract void closeAll()
public static ServerCnxnFactory createFactory() throws java.io.IOException
java.io.IOException
public static ServerCnxnFactory createFactory(int clientPort, int maxClientCnxns) throws java.io.IOException
java.io.IOException
public static ServerCnxnFactory createFactory(java.net.InetSocketAddress addr, int maxClientCnxns) throws java.io.IOException
java.io.IOException
public abstract java.net.InetSocketAddress getLocalAddress()
public void unregisterConnection(ServerCnxn serverCnxn)
public void registerConnection(ServerCnxn serverCnxn)
protected void configureSaslLogin() throws java.io.IOException
java.io.IOException
- if jaas.conf is missing or there's an error in it.Copyright © 2023 The Apache Software Foundation