public synchronized Map<String, Object> getConnectionInfo(boolean brief) {
Map<String, Object> info = new LinkedHashMap<String, Object>();
info.put("remote_socket_address", getRemoteSocketAddress());
info.put("interest_ops", getInterestOps());
info.put("outstanding_requests", getOutstandingRequests());
info.put("packets_received", getPacketsReceived());
info.put("packets_sent", getPacketsSent());
if (!brief) {
info.put("session_id", getSessionId());
info.put("last_operation", getLastOperation());
info.put("established", getEstablished());
info.put("session_timeout", getSessionTimeout());
info.put("last_cxid", getLastCxid());
info.put("last_zxid", getLastZxid());
info.put("last_response_time", getLastResponseTime());
info.put("last_latency", getLastLatency());
info.put("min_latency", getMinLatency());
info.put("avg_latency", getAvgLatency());
info.put("max_latency", getMaxLatency());
}
return info;
}