Watcherpublic class NIOServerCnxn extends ServerCnxn
ServerCnxn.CloseRequestException, ServerCnxn.EndOfStreamExceptionWatcher.Event| Modifier and Type | Field | Description |
|---|---|---|
protected java.nio.channels.SelectionKey |
sk |
|
protected ZooKeeperServer |
zkServer |
authInfo, 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 | Description |
|---|---|
NIOServerCnxn(ZooKeeperServer zk,
java.nio.channels.SocketChannel sock,
java.nio.channels.SelectionKey sk,
NIOServerCnxnFactory factory) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
disableRecv() |
|
void |
enableRecv() |
|
int |
getInterestOps() |
|
long |
getOutstandingRequests() |
|
java.net.InetSocketAddress |
getRemoteSocketAddress() |
|
long |
getSessionId() |
|
int |
getSessionTimeout() |
|
java.net.InetAddress |
getSocketAddress() |
Wrapper method to return the socket address
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAuthInfo, 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()
public java.net.InetAddress getSocketAddress()
ServerCnxngetSocketAddress in class ServerCnxnprotected 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