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