if(log.isInfoEnabled()) log.info("consolidated digest=" + new_digest);
if(log.isDebugEnabled()) log.debug("consolidated digest=" + new_digest);
    MergeData consolidateMergeData(Vector v) {        MergeData ret=null;        MergeData tmp_data;        long logical_time=0; // for new_vid        ViewId new_vid, tmp_vid;        MergeView new_view;        View tmp_view;        Membership new_mbrs=new Membership();        int num_mbrs=0;        Digest new_digest=null;        Address new_coord;        Vector subgroups=new Vector();        // contains a list of Views, each View is a subgroup        for(int i=0; i < v.size(); i++) {            tmp_data=(MergeData)v.elementAt(i);                if(log.isInfoEnabled()) log.info("merge data is " + tmp_data);            tmp_view=tmp_data.getView();            if(tmp_view != null) {                tmp_vid=tmp_view.getVid();                if(tmp_vid != null) {                    // compute the new view id (max of all vids +1)                    logical_time=Math.max(logical_time, tmp_vid.getId());                }            }            // merge all membership lists into one (prevent duplicates)            new_mbrs.add(tmp_view.getMembers());            subgroups.addElement(tmp_view.clone());        }        // the new coordinator is the first member of the consolidated & sorted membership list        new_mbrs.sort();        num_mbrs=new_mbrs.size();        new_coord=num_mbrs > 0? (Address)new_mbrs.elementAt(0) : null;        if(new_coord == null) {            if(log.isErrorEnabled()) log.error("new_coord == null");            return null;        }        new_vid=new ViewId(new_coord, logical_time + 1);        // determine the new view        new_view=new MergeView(new_vid, new_mbrs.getMembers(), subgroups);            if(log.isInfoEnabled()) log.info("new merged view will be " + new_view);        // determine the new digest        new_digest=consolidateDigests(v, num_mbrs);        if(new_digest == null) {            if(log.isErrorEnabled()) log.error("digest could not be consolidated");            return null;        }            if(log.isInfoEnabled()) log.info("consolidated digest=" + new_digest);        ret=new MergeData(gms.local_addr, new_view, new_digest);        return ret;    }