if(log.isDebugEnabled()) log.debug("passing down a SUSPEND_STABLE event"); passDown(new Event(Event.SUSPEND_STABLE));
    public void down(Event evt) {        byte[] state;        Address target;        StateTransferInfo info;        StateHeader hdr;        Message state_req, state_rsp;        Address requester;        switch(evt.getType()) {            case Event.TMP_VIEW:            case Event.VIEW_CHANGE:                Vector new_members=((View)evt.getArg()).getMembers();                synchronized(members) {                    members.removeAllElements();                    if(new_members != null && new_members.size() > 0)                        for(int k=0; k < new_members.size(); k++)                            members.addElement(new_members.elementAt(k));                }                break;            // generated by JChannel.getState(). currently, getting the state from more than 1 mbrs is not implemented            case Event.GET_STATE:                info=(StateTransferInfo)evt.getArg();                if(info.type != StateTransferInfo.GET_FROM_SINGLE) {                    if(log.isWarnEnabled()) log.warn("[GET_STATE] (info=" + info + "): getting the state from " +                            "all members is not currently supported by pbcast.STATE_TRANSFER, will use " +                            "coordinator to fetch state instead");                }                if(info.target == null) {                    target=determineCoordinator();                }                else {                    target=info.target;                    if(target.equals(local_addr)) {                        if(log.isErrorEnabled()) log.error("GET_STATE: cannot fetch state from myself !");                        target=null;                    }                }                if(target == null) {                    if(log.isDebugEnabled()) log.debug("GET_STATE: first member (no state)");                    passUp(new Event(Event.GET_STATE_OK, null));                }                else {                    state_req=new Message(target, null, null);                    state_req.putHeader(getName(), new StateHeader(StateHeader.STATE_REQ, local_addr, state_id++, null));                    if(log.isDebugEnabled()) log.debug("GET_STATE: asking " + target + " for state");                    start=System.currentTimeMillis();                    passDown(new Event(Event.MSG, state_req));                }                return;                 // don't pass down any further !            case Event.GET_APPLSTATE_OK:                state=(byte[])evt.getArg();                synchronized(state_requesters) {                    if(state_requesters.size() == 0) {                        if(log.isWarnEnabled())                            log.warn("GET_APPLSTATE_OK: received application state, but there are no requesters !");                        return;                    }                    if(digest == null)                        if(log.isWarnEnabled()) log.warn("GET_APPLSTATE_OK: received application state, " +                                "but there is no digest !");                    else                        digest=digest.copy();                    for(Enumeration e=state_requesters.elements(); e.hasMoreElements();) {                        requester=(Address)e.nextElement();                        state_rsp=new Message(requester, null, state); // put the state into state_rsp.buffer                        hdr=new StateHeader(StateHeader.STATE_RSP, local_addr, 0, digest);                        state_rsp.putHeader(getName(), hdr);                        passDown(new Event(Event.MSG, state_rsp));                    }                    digest=null;                    state_requesters.removeAll();                }                return;                 // don't pass down any further !        }        passDown(evt);              // pass on to the layer below us    }