public Map<String,Object> dumpStats(String protocol_name, List<String> attrs) { return prot_stack.dumpStats(protocol_name, attrs); }
@ManagedOperation public Map<String,Object> dumpStats(String protocol_name) { return prot_stack.dumpStats(protocol_name, null); }
/** Returns a map of statistics of the various protocols and of the channel itself */ @ManagedOperation public Map<String,Object> dumpStats() { Map<String,Object> retval=prot_stack.dumpStats(); if(retval != null) { Map<String,Long> tmp=dumpChannelStats(); if(tmp != null) retval.put("channel", tmp); } return retval; }
/** * @return Map<String,Map<key,val>> */ public Map<String,Object> dumpStats() { Map<String,Object> retval=new HashMap<>(); // no need to be sorted, we need order of protocols as in the config! for(Protocol p=top_prot; p != null; p=p.getDownProtocol()) { String prot_name=p.getName(); if(prot_name == null) continue; Map<String,Object> tmp=new TreeMap<>(); dumpStats(p, tmp, log); if(!tmp.isEmpty()) retval.put(prot_name, tmp); } return retval; }
public Map<String,Object> dumpStats(String protocol_name, List<String> attrs) { Protocol prot=findProtocol(protocol_name); if(prot == null) return null; Map<String,Object> retval=new HashMap<>(), tmp=new TreeMap<>(); dumpStats(prot, tmp, log); if(attrs != null && !attrs.isEmpty()) { // weed out attrs not in list for(Iterator<String> it=tmp.keySet().iterator(); it.hasNext();) { String attrname=it.next(); boolean found=false; for(String attr: attrs) { if(attrname.startsWith(attr)) { found=true; break; // found } } if(!found) it.remove(); } } retval.put(protocol_name, tmp); return retval; }
public Map<String,Object> dumpStats(String protocol_name, List<String> attrs) { return prot_stack.dumpStats(protocol_name, attrs); }
@ManagedOperation public Map<String,Object> dumpStats(String protocol_name) { return prot_stack.dumpStats(protocol_name, null); }
/** * Returns a map of statistics of the various protocols and of the channel itself. * @return Map<String,Map>. A map where the keys are the protocols ("channel" pseudo key is * used for the channel itself") and the values are property maps. */ public Map dumpStats() { Map retval=prot_stack.dumpStats(); if(retval != null) { Map tmp=dumpChannelStats(); if(tmp != null) retval.put("channel", tmp); } return retval; }
public Map<String,Object> dumpStats(String protocol_name, List<String> attrs) { Protocol prot=findProtocol(protocol_name); if(prot == null) return null; Map<String,Object> retval=new HashMap<>(), tmp=new TreeMap<>(); dumpStats(prot, tmp, log); if(attrs != null && !attrs.isEmpty()) { // weed out attrs not in list for(Iterator<String> it=tmp.keySet().iterator(); it.hasNext();) { String attrname=it.next(); boolean found=false; for(String attr: attrs) { if(attrname.startsWith(attr)) { found=true; break; // found } } if(!found) it.remove(); } } retval.put(protocol_name, tmp); return retval; }
/** Returns a map of statistics of the various protocols and of the channel itself */ @ManagedOperation public Map<String,Object> dumpStats() { Map<String,Object> retval=prot_stack.dumpStats(); if(retval != null) { Map<String,Long> tmp=dumpChannelStats(); if(tmp != null) retval.put("channel", tmp); } return retval; }
/** * @return Map<String,Map<key,val>> */ public Map<String,Object> dumpStats() { Map<String,Object> retval=new HashMap<>(); // no need to be sorted, we need order of protocols as in the config! for(Protocol p=top_prot; p != null; p=p.getDownProtocol()) { String prot_name=p.getName(); if(prot_name == null) continue; Map<String,Object> tmp=new TreeMap<>(); dumpStats(p, tmp, log); if(!tmp.isEmpty()) retval.put(prot_name, tmp); } return retval; }