public void up(MessageBatch batch) { for (Iterator<Message> it = batch.iterator(); it.hasNext(); ) { Message msg = it.next(); if (msg != null && shouldDropUpMessage(msg, msg.getSrc())) it.remove(); } if (!batch.isEmpty()) up_prot.up(batch); }
public String dumpQueue() { StringBuilder sb = new StringBuilder(); List v = queue.values(); for (Iterator it = v.iterator(); it.hasNext(); ) { sb.append(it.next() + "\n"); } return sb.toString(); }