/** * Create an instance of {@link QuickStatWrapper } * */ public QuickStatWrapper createQuickStatWrapper() { return new QuickStatWrapper(); }
w = new QuickStatWrapper(); w.setAction(actions.get(i)); w.setUptime(uptime); d.setAverageMessagesDropped(rs.getLong("avgmsgdropped")); d.setLargestQueueDepth(rs.getLong("maxqueuedepth")); w.getQuickStatData().add(d);
/** * returns null if no records are found (meaning no aggregated stats are * available yet) * * @param data * @param timeInMs * @return */ private QuickStatData getRecord(QuickStatWrapper data, long timeInMs) { if (data == null) { return null; } for (int i = 0; i < data.getQuickStatData().size(); i++) { if ((data.getQuickStatData().get(i).getTimeInMinutes().longValue() * 60 * 1000) == timeInMs) { return data.getQuickStatData().get(i); } } return null; }