public class NIOServerCnxn extends ServerCnxn
ServerCnxn.CloseRequestException, ServerCnxn.EndOfStreamExceptionWatcher.Event| Modifier and Type | Field and Description |
|---|---|
protected java.nio.channels.SelectionKey |
sk |
protected ZooKeeperServer |
zkServer |
authInfo, 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 void |
internalSendBuffer(java.nio.ByteBuffer bb)
This method implements the internals of sendBuffer.
|
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, getCommandString, getEstablished, getLastCxid, getLastLatency, getLastOperation, getLastResponseTime, getLastZxid, getMaxLatency, getMinLatency, getPacketsReceived, getPacketsSent, incrPacketsReceived, incrPacketsSent, isEnabled, isKnown, packetReceived, packetSent, removeAuthInfo, resetStats, resetWhiteList, updateStatsForResponseprotected final java.nio.channels.SelectionKey sk
protected final ZooKeeperServer zkServer
public 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 void internalSendBuffer(java.nio.ByteBuffer bb)
bb - Buffer to send.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 © 2018 The Apache Software Foundation