private void gatherAndSendInteractionCounter(long now) { InteractionCounterBasket basket = new InteractionCounterBasket(); for (int i = 0; i < interactionCountStatList.size(); i++) { CountStat stat = interactionCountStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } InteractionPerfCounterPack[] packs = basket.geAllAsArray(); if (packs != null && packs.length > 0) { DataProxy.sendCounter(packs); } }
private void gatherAndSendInteractionCounter(long now) { InteractionCounterBasket basket = new InteractionCounterBasket(); for (int i = 0; i < interactionCountStatList.size(); i++) { CountStat stat = interactionCountStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } InteractionPerfCounterPack[] packs = basket.geAllAsArray(); if (packs != null && packs.length > 0) { DataProxy.sendCounter(packs); } }
private void gatherAndSendInteractionCounter(long now) { InteractionCounterBasket basket = new InteractionCounterBasket(); for (int i = 0; i < interactionCountStatList.size(); i++) { CountStat stat = interactionCountStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } InteractionPerfCounterPack[] packs = basket.geAllAsArray(); if (packs != null && packs.length > 0) { DataProxy.sendCounter(packs); } }