/** * Retrieves a map containing the high / low and current count statistics for the 'sessions', * 'conversations' and 'packet_count' statistics. * * @return map containing 3 maps (keys = 'sessions, 'conversations' and 'packet_count') each * containing an array of int (low value, high value and current value). */ public Map<String, Map> getUpdatedStats(String timePeriod) { Map<String, Map> results = new HashMap<String, Map>(); long[] startAndEnd = GraphEngine.parseTimePeriod(timePeriod); String[] stats = new String[] { "sessions", "conversations", "packet_count", "proxyTransferRate", "muc_rooms", "server_sessions", "server_bytes" }; for (String stat : stats) { results.put(stat, getUpdatedStat(stat, startAndEnd)); } return results; }
/** * Retrieve a a single stat update given a stat name and the name of a time period. * * @param statkey * @param timePeriod * @return map containing keys 'low', 'high' and 'count'. */ public Map getUpdatedStat(String statkey, String timePeriod) { long[] startAndEnd = GraphEngine.parseTimePeriod(timePeriod); return getUpdatedStat(statkey, startAndEnd); }