append(entry.sent_msgs_seqno).append(", first=").append(hdr.first).append(')'));  if(Global.copy) entry.sent_msgs.add(entry.sent_msgs_seqno, msg.copy()); else entry.sent_msgs.add(entry.sent_msgs_seqno, msg);
append(seqno));
    public void down(Event evt) {        switch (evt.getType()) {        case Event.MSG: // Add UnicastHeader, add to AckSenderWindow and pass down            Message msg = (Message) evt.getArg();            Object dst = msg.getDest();            /* only handle unicast messages */            if (dst == null || ((Address) dst).isMulticastAddress()) {                break;            }            if(loopback && dst.equals(local_addr)) {                Message copy=msg.copy();                copy.setSrc(local_addr);                passUp(new Event(Event.MSG, copy));                return;            }            Entry entry;            synchronized(connections) {                entry=(Entry)connections.get(dst);                if(entry == null) {                    entry=new Entry();                    connections.put(dst, entry);                }            }            synchronized(entry) { // threads will only sync if they access the same entry                UnicastHeader hdr=new UnicastHeader(UnicastHeader.DATA, entry.sent_msgs_seqno);                if(entry.sent_msgs == null) { // first msg to peer 'dst'                    hdr.first=true;                    entry.sent_msgs=new AckSenderWindow(this, timeout, this, timer); // use the protocol stack's timer                }                msg.putHeader(name, hdr);                if(trace)                    log.trace(new StringBuffer().append(local_addr).append(" --> DATA(").append(dst).append(": #").                              append(entry.sent_msgs_seqno).append(", first=").append(hdr.first).append(')'));                if(Global.copy)                    entry.sent_msgs.add(entry.sent_msgs_seqno, msg.copy());  // add *including* UnicastHeader                else                    entry.sent_msgs.add(entry.sent_msgs_seqno, msg);         // add *including* UnicastHeader                entry.sent_msgs_seqno++;                num_msgs_sent++;                num_bytes_sent+=msg.getLength();            }            msg=null;            return; // AckSenderWindow will send message for us        case Event.BECOME_SERVER:            operational=true;            break;        case Event.VIEW_CHANGE:  // remove connections to peers that are not members anymore !            Vector new_members=((View)evt.getArg()).getMembers();            Vector left_members;            synchronized(members) {                left_members=Util.determineLeftMembers(members, new_members);                members.removeAllElements();                if(new_members != null)                    members.addAll(new_members);            }            // Remove all connections for members that left between the current view and the new view            // See DESIGN for details            boolean rc;            if(use_gms && left_members.size() > 0) {                Object mbr;                for(int i=0; i < left_members.size(); i++) {                    mbr=left_members.elementAt(i);                    rc=removeConnection(mbr);                    if(rc && trace)                        log.trace("removed " + mbr + " from connection table, members " + left_members + " left");                }            }            break;        }        passDown(evt);          // Pass on to the layer below us    }