public abstract class ServerCnxn extends java.lang.Object implements Watcher
Modifier and Type | Class and Description |
---|---|
protected static class |
ServerCnxn.CloseRequestException |
protected static class |
ServerCnxn.EndOfStreamException |
Watcher.Event
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<Id> |
authInfo |
protected static java.util.HashMap<java.lang.Integer,java.lang.String> |
cmd2String |
protected static int |
confCmd |
protected static int |
consCmd |
protected long |
count |
protected static int |
crstCmd |
protected static int |
dumpCmd |
protected static int |
enviCmd |
protected java.util.Date |
established |
protected static int |
getTraceMaskCmd |
protected static int |
isroCmd |
protected long |
lastCxid |
protected long |
lastLatency |
protected java.lang.String |
lastOp |
protected long |
lastResponseTime |
protected long |
lastZxid |
protected long |
maxLatency |
static java.lang.Object |
me |
protected long |
minLatency |
protected static int |
mntrCmd |
protected java.util.concurrent.atomic.AtomicLong |
packetsReceived |
protected java.util.concurrent.atomic.AtomicLong |
packetsSent |
protected static int |
ruokCmd |
protected static int |
setTraceMaskCmd |
protected static int |
srstCmd |
protected static int |
srvrCmd |
protected static int |
statCmd |
protected long |
totalLatency |
protected static int |
wchcCmd |
protected static int |
wchpCmd |
protected static int |
wchsCmd |
protected ZooKeeperSaslServer |
zooKeeperSaslServer |
Constructor and Description |
---|
ServerCnxn() |
Modifier and Type | Method and Description |
---|---|
void |
addAuthInfo(Id id) |
protected void |
dumpConnectionInfo(java.io.PrintWriter pwriter,
boolean brief)
Print information about the connection.
|
java.util.List<Id> |
getAuthInfo()
auth info for the cnxn, returns an unmodifyable list
|
long |
getAvgLatency()
Average latency in ms
|
java.util.Date |
getEstablished()
Date/time the connection was established
|
abstract int |
getInterestOps() |
long |
getLastCxid()
Last cxid of this connection
|
long |
getLastLatency()
Latency of last response to client on this connection in ms
|
java.lang.String |
getLastOperation()
Last operation performed by this connection
|
long |
getLastResponseTime()
Last time server sent a response to client on this connection
|
long |
getLastZxid()
Last zxid of this connection
|
long |
getMaxLatency()
Max latency in ms
|
long |
getMinLatency()
Min latency in ms
|
abstract long |
getOutstandingRequests()
The number of requests that have been submitted but not yet
responded to.
|
long |
getPacketsReceived()
Number of packets received
|
long |
getPacketsSent()
Number of packets sent (incl notifications)
|
abstract java.net.InetSocketAddress |
getRemoteSocketAddress() |
protected void |
incrOutstandingRequests(RequestHeader h) |
protected long |
incrPacketsReceived() |
protected long |
incrPacketsSent() |
protected void |
packetReceived() |
protected void |
packetSent() |
abstract void |
process(WatchedEvent event) |
boolean |
removeAuthInfo(Id id) |
void |
resetStats()
Reset counters
|
abstract void |
sendResponse(ReplyHeader h,
org.apache.jute.Record r,
java.lang.String tag) |
protected abstract ServerStats |
serverStats() |
java.lang.String |
toString()
Prints detailed stats information for the connection.
|
protected void |
updateStatsForResponse(long cxid,
long zxid,
java.lang.String op,
long start,
long end) |
public static final java.lang.Object me
protected java.util.ArrayList<Id> authInfo
protected ZooKeeperSaslServer zooKeeperSaslServer
protected static final int confCmd
protected static final int consCmd
protected static final int crstCmd
protected static final int dumpCmd
protected static final int enviCmd
protected static final int getTraceMaskCmd
protected static final int ruokCmd
protected static final int setTraceMaskCmd
protected static final int srvrCmd
protected static final int srstCmd
protected static final int statCmd
protected static final int wchcCmd
protected static final int wchpCmd
protected static final int wchsCmd
protected static final int mntrCmd
protected static final int isroCmd
protected static final java.util.HashMap<java.lang.Integer,java.lang.String> cmd2String
protected final java.util.Date established
protected final java.util.concurrent.atomic.AtomicLong packetsReceived
protected final java.util.concurrent.atomic.AtomicLong packetsSent
protected long minLatency
protected long maxLatency
protected java.lang.String lastOp
protected long lastCxid
protected long lastZxid
protected long lastResponseTime
protected long lastLatency
protected long count
protected long totalLatency
public abstract void sendResponse(ReplyHeader h, org.apache.jute.Record r, java.lang.String tag) throws java.io.IOException
java.io.IOException
public abstract void process(WatchedEvent event)
public java.util.List<Id> getAuthInfo()
public void addAuthInfo(Id id)
public boolean removeAuthInfo(Id id)
protected void packetReceived()
protected void packetSent()
protected abstract ServerStats serverStats()
public void resetStats()
protected long incrPacketsReceived()
protected void incrOutstandingRequests(RequestHeader h)
protected long incrPacketsSent()
protected void updateStatsForResponse(long cxid, long zxid, java.lang.String op, long start, long end)
public java.util.Date getEstablished()
public abstract long getOutstandingRequests()
public long getPacketsReceived()
public long getPacketsSent()
public long getMinLatency()
public long getAvgLatency()
public long getMaxLatency()
public java.lang.String getLastOperation()
public long getLastCxid()
public long getLastZxid()
public long getLastResponseTime()
public long getLastLatency()
public java.lang.String toString()
toString
in class java.lang.Object
for brief stats
public abstract java.net.InetSocketAddress getRemoteSocketAddress()
public abstract int getInterestOps()
protected void dumpConnectionInfo(java.io.PrintWriter pwriter, boolean brief)
brief
- iff true prints brief details, otw full detailCopyright © 2015 The Apache Software Foundation