Package org.apache.zookeeper.server
Class ConnectionBean
java.lang.Object
org.apache.zookeeper.server.ConnectionBean
- All Implemented Interfaces:
ZKMBeanInfo,ConnectionMXBean
Implementation of connection MBean interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongAverage latency in msString[]Last cxid of this connectionlongLatency of last response to client on this connection in msLast operation performed by this connectionLast time server sent a response to client on this connectionLast zxid of this connectionlongMax latency in mslongMin latency in msgetName()longlonglongintbooleanisHidden()If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools.voidReset countersvoidTerminate thei client connection.voidTerminate this client session.toString()
-
Constructor Details
-
ConnectionBean
-
-
Method Details
-
getSessionId
- Specified by:
getSessionIdin interfaceConnectionMXBean- Returns:
- client's session id
-
getSourceIP
- Specified by:
getSourceIPin interfaceConnectionMXBean- Returns:
- source (client) IP address
-
getName
- Specified by:
getNamein interfaceZKMBeanInfo- Returns:
- a string identifying the MBean
-
isHidden
public boolean isHidden()Description copied from interface:ZKMBeanInfoIf isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools. Used for grouping MBeans.- Specified by:
isHiddenin interfaceZKMBeanInfo- Returns:
- true if the MBean is hidden.
-
getEphemeralNodes
- Specified by:
getEphemeralNodesin interfaceConnectionMXBean- Returns:
- number of ephemeral nodes owned by this connection
-
getStartedTime
- Specified by:
getStartedTimein interfaceConnectionMXBean- Returns:
- time the connection was started
-
terminateSession
public void terminateSession()Description copied from interface:ConnectionMXBeanTerminate this client session. The client will reconnect with a different session id.- Specified by:
terminateSessionin interfaceConnectionMXBean
-
terminateConnection
public void terminateConnection()Description copied from interface:ConnectionMXBeanTerminate thei client connection. The client will immediately attempt to reconnect with the same session id.- Specified by:
terminateConnectionin interfaceConnectionMXBean
-
resetCounters
public void resetCounters()Description copied from interface:ConnectionMXBeanReset counters- Specified by:
resetCountersin interfaceConnectionMXBean
-
toString
-
getOutstandingRequests
public long getOutstandingRequests()- Specified by:
getOutstandingRequestsin interfaceConnectionMXBean- Returns:
- number of requets being processed
-
getPacketsReceived
public long getPacketsReceived()- Specified by:
getPacketsReceivedin interfaceConnectionMXBean- Returns:
- packets received from this client
-
getPacketsSent
public long getPacketsSent()- Specified by:
getPacketsSentin interfaceConnectionMXBean- Returns:
- number of packets sent to this client
-
getSessionTimeout
public int getSessionTimeout()- Specified by:
getSessionTimeoutin interfaceConnectionMXBean- Returns:
- session timeout in ms
-
getMinLatency
public long getMinLatency()Description copied from interface:ConnectionMXBeanMin latency in ms- Specified by:
getMinLatencyin interfaceConnectionMXBean
-
getAvgLatency
public long getAvgLatency()Description copied from interface:ConnectionMXBeanAverage latency in ms- Specified by:
getAvgLatencyin interfaceConnectionMXBean
-
getMaxLatency
public long getMaxLatency()Description copied from interface:ConnectionMXBeanMax latency in ms- Specified by:
getMaxLatencyin interfaceConnectionMXBean
-
getLastOperation
Description copied from interface:ConnectionMXBeanLast operation performed by this connection- Specified by:
getLastOperationin interfaceConnectionMXBean
-
getLastCxid
Description copied from interface:ConnectionMXBeanLast cxid of this connection- Specified by:
getLastCxidin interfaceConnectionMXBean
-
getLastZxid
Description copied from interface:ConnectionMXBeanLast zxid of this connection- Specified by:
getLastZxidin interfaceConnectionMXBean
-
getLastResponseTime
Description copied from interface:ConnectionMXBeanLast time server sent a response to client on this connection- Specified by:
getLastResponseTimein interfaceConnectionMXBean
-
getLastLatency
public long getLastLatency()Description copied from interface:ConnectionMXBeanLatency of last response to client on this connection in ms- Specified by:
getLastLatencyin interfaceConnectionMXBean
-