public class ControllableConnectionFactory extends NIOServerCnxnFactory
NIOServerCnxnFactory.SelectorThreadmaxClientCnxns, workerPool, ZOOKEEPER_NIO_DIRECT_BUFFER_BYTES, ZOOKEEPER_NIO_NUM_SELECTOR_THREADS, ZOOKEEPER_NIO_NUM_WORKER_THREADS, ZOOKEEPER_NIO_SESSIONLESS_CNXN_TIMEOUT, ZOOKEEPER_NIO_SHUTDOWN_TIMEOUTcnxns, login, maxCnxns, saslServerCallbackHandler, secure, zkServer, ZOOKEEPER_MAX_CONNECTION_DEFAULT, ZOOKEEPER_SERVER_CNXN_FACTORY| Constructor and Description |
|---|
ControllableConnectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected NIOServerCnxn |
createConnection(SocketChannel sock,
SelectionKey sk,
NIOServerCnxnFactory.SelectorThread selectorThread) |
void |
delayRequestIfNeeded()
Called by the connection to delay processing requests from the client.
|
void |
delayResponses(long delayInMs) |
void |
failAllFutureRequests() |
void |
failFutureRequests(long requestsToFail) |
void |
holdAllFutureResponses() |
void |
holdFutureResponses(long requestsToHold) |
void |
resetBadBehavior() |
boolean |
shouldFailNextRequest()
Check if we should fail the next incoming request.
|
boolean |
shouldSendResponse()
Check if we should send a response to the latest processed request (true),
or eat the response to mess with the client (false).
|
closeAll, configure, dumpConnections, getAllConnectionInfo, getConnections, getDirectBuffer, getLocalAddress, getLocalPort, getMaxClientCnxnsPerHost, getSocketListenBacklog, join, reconfigure, removeCnxn, resetAllConnectionStats, setMaxClientCnxnsPerHost, shutdown, start, startup, stop, touchCnxnaddSession, closeSession, configure, configure, configureSaslLogin, createFactory, createFactory, createFactory, createFactory, createFactory, getMaxCnxns, getNumAliveConnections, getUserName, getZooKeeperServer, initMaxCnxns, isSecure, limitTotalNumberOfCnxns, registerConnection, removeCnxnFromSessionMap, setZooKeeperServer, startup, unregisterConnectionprotected NIOServerCnxn createConnection(SocketChannel sock, SelectionKey sk, NIOServerCnxnFactory.SelectorThread selectorThread) throws IOException
createConnection in class NIOServerCnxnFactoryIOExceptionpublic void delayRequestIfNeeded()
public boolean shouldFailNextRequest()
public boolean shouldSendResponse()
public void delayResponses(long delayInMs)
public void resetBadBehavior()
public void failAllFutureRequests()
public void failFutureRequests(long requestsToFail)
public void holdAllFutureResponses()
public void holdFutureResponses(long requestsToHold)
Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.