becomeCoordinator();
if (! haveCoordinatorRole()) becomeCoordinator();
    public void installView(ViewId new_view, Vector mbrs) {        Object coord;        int rc;        synchronized(view_mutex) {                    // serialize access to views            ltime=Math.max(new_view.getId(), ltime);  // compute Lamport logical time            if(log.isInfoEnabled()) log.info("received view change, vid=" + new_view);            /* Check for self-inclusion: if I'm not part of the new membership, I just discard it.               This ensures that messages sent in view V1 are only received by members of V1 */            if(checkSelfInclusion(mbrs) == false) {                if(log.isWarnEnabled()) log.warn("I'm not member of " + mbrs + ", discarding");                return;            }            if(view_id == null) {                if(new_view == null) {                    if(log.isErrorEnabled()) log.error("view_id and new_view are null !");                    return;                }                else {  // view_id is null, new_view not: just install new_view (we're still a client)                    view_id=(ViewId)new_view.clone();                }            }            else {                if(new_view == null) {  // this should never happen though !                    if(log.isErrorEnabled()) log.error("new_view is null !");                    return;                }                else {  // both view_id and new_view are not null                    rc=new_view.compareTo(view_id);  // rc should always be a positive number                    if(rc <= 0) {  // don't accept view id lower than our own                         {                            if(log.isWarnEnabled()) log.warn("received view <= current view; discarding it ! " +                                    "(view_id: " + view_id + ", new_view: " + new_view + ')');                        }                        return;                    }                    else {  // the check for vid equality was okay, assign new_view to view_id                        if(new_view.getCoordAddress() != null) {                            view_id=new ViewId(new_view.getCoordAddress(), new_view.getId());                        }                        else {                            view_id=new ViewId(view_id.getCoordAddress(), new_view.getId());                        }                    }                }            }            if(mbrs != null && mbrs.size() > 0)                members.set(mbrs);            // Send VIEW_CHANGE event up and down the stack:            Event view_event=new Event(Event.VIEW_CHANGE, makeView(members.getMembers()));            passDown(view_event); // needed e.g. by failure detector or UDP            passUp(view_event);            coord=determineCoordinator();            if(coord != null && coord.equals(local_addr)) {                becomeCoordinator();            }            else {                if(haveCoordinatorRole() && !local_addr.equals(coord))                    becomeParticipant();            }        }    }