public abstract class ServerCnxnFactory extends Object
Modifier and Type | Field and Description |
---|---|
protected Set<ServerCnxn> |
cnxns |
Login |
login |
protected SaslServerCallbackHandler |
saslServerCallbackHandler |
protected boolean |
secure |
protected ZooKeeperServer |
zkServer |
static String |
ZOOKEEPER_SERVER_CNXN_FACTORY |
Constructor and Description |
---|
ServerCnxnFactory() |
Modifier and Type | Method and Description |
---|---|
abstract void |
closeAll() |
abstract boolean |
closeSession(long sessionId) |
void |
configure(InetSocketAddress addr,
int maxcc) |
abstract void |
configure(InetSocketAddress addr,
int maxcc,
boolean secure) |
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<Map<String,Object>> |
getAllConnectionInfo(boolean brief) |
abstract Iterable<ServerCnxn> |
getConnections() |
abstract InetSocketAddress |
getLocalAddress() |
abstract int |
getLocalPort() |
abstract int |
getMaxClientCnxnsPerHost()
Maximum number of connections allowed from particular host (ip)
|
int |
getNumAliveConnections() |
ZooKeeperServer |
getZooKeeperServer() |
boolean |
isSecure() |
abstract void |
join() |
abstract void |
reconfigure(InetSocketAddress addr) |
void |
registerConnection(ServerCnxn serverCnxn) |
abstract void |
resetAllConnectionStats() |
abstract void |
setMaxClientCnxnsPerHost(int max)
Maximum number of connections allowed from particular host (ip)
|
void |
setZooKeeperServer(ZooKeeperServer zks) |
abstract void |
shutdown() |
abstract void |
start() |
void |
startup(ZooKeeperServer zkServer) |
abstract void |
startup(ZooKeeperServer zkServer,
boolean startServer) |
void |
unregisterConnection(ServerCnxn serverCnxn) |
public static final String ZOOKEEPER_SERVER_CNXN_FACTORY
protected boolean secure
protected SaslServerCallbackHandler saslServerCallbackHandler
public Login login
protected ZooKeeperServer zkServer
protected final Set<ServerCnxn> cnxns
public abstract int getLocalPort()
public abstract Iterable<ServerCnxn> getConnections()
public int getNumAliveConnections()
public ZooKeeperServer getZooKeeperServer()
public abstract boolean closeSession(long sessionId)
public void configure(InetSocketAddress addr, int maxcc) throws IOException
IOException
public abstract void configure(InetSocketAddress addr, int maxcc, boolean secure) throws IOException
IOException
public abstract void reconfigure(InetSocketAddress addr)
public abstract int getMaxClientCnxnsPerHost()
public abstract void setMaxClientCnxnsPerHost(int max)
public boolean isSecure()
public void startup(ZooKeeperServer zkServer) throws IOException, InterruptedException
IOException
InterruptedException
public abstract void startup(ZooKeeperServer zkServer, boolean startServer) 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 zks)
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 abstract void resetAllConnectionStats()
public abstract Iterable<Map<String,Object>> getAllConnectionInfo(boolean brief)
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 © 2008–2019 The Apache Software Foundation. All rights reserved.