public class NIOServerCnxn extends ServerCnxn
ServerCnxn.CloseRequestException, ServerCnxn.EndOfStreamExceptionWatcher.EventauthInfo, cmd2String, confCmd, consCmd, count, crstCmd, dumpCmd, enviCmd, established, getTraceMaskCmd, isroCmd, lastCxid, lastLatency, lastOp, lastResponseTime, lastZxid, maxLatency, me, minLatency, mntrCmd, packetsReceived, packetsSent, ruokCmd, setTraceMaskCmd, srstCmd, srvrCmd, statCmd, totalLatency, wchcCmd, wchpCmd, wchsCmd, zooKeeperSaslServer| Constructor and Description |
|---|
NIOServerCnxn(ZooKeeperServer zk,
java.nio.channels.SocketChannel sock,
java.nio.channels.SelectionKey sk,
NIOServerCnxnFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
disableRecv() |
void |
enableRecv() |
int |
getInterestOps() |
long |
getOutstandingRequests()
The number of requests that have been submitted but not yet
responded to.
|
java.net.InetSocketAddress |
getRemoteSocketAddress() |
long |
getSessionId() |
int |
getSessionTimeout() |
protected void |
incrOutstandingRequests(RequestHeader h) |
protected boolean |
isSocketOpen()
Only used in order to allow testing
|
void |
process(WatchedEvent event) |
void |
sendBuffer(java.nio.ByteBuffer bb) |
void |
sendCloseSession() |
void |
sendResponse(ReplyHeader h,
org.apache.jute.Record r,
java.lang.String tag) |
protected ServerStats |
serverStats() |
void |
setSessionId(long sessionId) |
void |
setSessionTimeout(int sessionTimeout) |
java.lang.String |
toString()
Prints detailed stats information for the connection.
|
addAuthInfo, dumpConnectionInfo, getAuthInfo, getAvgLatency, getEstablished, getLastCxid, getLastLatency, getLastOperation, getLastResponseTime, getLastZxid, getMaxLatency, getMinLatency, getPacketsReceived, getPacketsSent, incrPacketsReceived, incrPacketsSent, packetReceived, packetSent, removeAuthInfo, resetStats, updateStatsForResponsepublic NIOServerCnxn(ZooKeeperServer zk, java.nio.channels.SocketChannel sock, java.nio.channels.SelectionKey sk, NIOServerCnxnFactory factory) throws java.io.IOException
java.io.IOExceptionpublic void sendCloseSession()
public void sendBuffer(java.nio.ByteBuffer bb)
protected boolean isSocketOpen()
protected void incrOutstandingRequests(RequestHeader h)
incrOutstandingRequests in class ServerCnxnpublic void disableRecv()
public void enableRecv()
public long getOutstandingRequests()
getOutstandingRequests in class ServerCnxnpublic int getSessionTimeout()
public java.lang.String toString()
ServerCnxntoString in class ServerCnxnfor brief statspublic void close()
public void sendResponse(ReplyHeader h, org.apache.jute.Record r, java.lang.String tag)
sendResponse in class ServerCnxnpublic void process(WatchedEvent event)
process in interface Watcherprocess in class ServerCnxnpublic long getSessionId()
public void setSessionId(long sessionId)
public void setSessionTimeout(int sessionTimeout)
public int getInterestOps()
getInterestOps in class ServerCnxnpublic java.net.InetSocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class ServerCnxnprotected ServerStats serverStats()
serverStats in class ServerCnxnCopyright © 2016 The Apache Software Foundation