292293294295296297298299300301302
win.add(1, new Message()); win.add(2, new Message()); win.add(3, new Message()); win.add(4, new Message()); while((win.remove()) != null) ; win.reset(); assertTrue(win.getLowestSeen() == 0); assertTrue(win.getHighestSeen() == 0); }
211212213214215216217218219220221
synchronized(digest) { for(Enumeration e=digest.keys(); e.hasMoreElements();) { key=(Address) e.nextElement(); if(!mbrs.contains(key)) { win=(NakReceiverWindow) digest.get(key); win.reset(); digest.remove(key); } } } }
433434435436437438439440441442443
long tmp_seqno=1; synchronized(digest) { for(Enumeration e=digest.elements(); e.hasMoreElements();) { win=(NakReceiverWindow) e.nextElement(); win.reset(); } digest.clear(); Map.Entry entry;
873874875876877878879880881882883
// 1. Remove all senders in received_msgs that are not members anymore for(Iterator it=received_msgs.keySet().iterator(); it.hasNext();) { sender=(Address)it.next(); if(!members.contains(sender)) { win=(NakReceiverWindow)received_msgs.get(sender); win.reset(); if(log.isDebugEnabled()) { log.debug("removing " + sender + " from received_msgs (not member anymore)"); } it.remove(); }
10261027102810291030103110321033103410351036
win=createNakReceiverWindow(sender, initial_seqno); received_msgs.put(sender, win); } else { if(win.getHighestReceived() < initial_seqno) { win.reset(); received_msgs.remove(sender); win=createNakReceiverWindow(sender, initial_seqno); received_msgs.put(sender, win); } }
12641265126612671268126912701271127212731274
// sent_msgs.clear(); synchronized(received_msgs) { for(Iterator it=received_msgs.values().iterator(); it.hasNext();) { win=(NakReceiverWindow)it.next(); win.reset(); } received_msgs.clear(); } }
359360361362363364365366367368369
win.add(1, new Message()); win.add(2, new Message()); win.add(3, new Message()); win.add(4, new Message()); while((win.remove()) != null) ; win.reset(); check(win, 0, 0, 0); } public void test12() throws Exception {
361362363364365366367368369370371
12591260126112621263126412651266126712681269