grid.onMembershipChange(joined, left);
NodeAddress localAddress = grid.getLocalAddress(); grid.onMembershipChange(joined, left, localAddress);
    public void viewAccepted(View newView)    {        log.info("viewAccepted " + newView);        // Diff the views.        ViewDiff diff;        NodeAddress coord;        synchronized (this)        {            diff = new ViewDiff(currentView, newView);            if (diff.isCoordinatorChanged())            {                coord = new JGroupsAddress(diff.getCoordinator());                log.info("*** Coordinator changed from " + coordinator + " to " + coord);                coordinator = coord;            }            else            {                // Otherwise, the coordinator hasn't changed so get it out in to a local                // so we don't have to sync again.                coord = coordinator;            }            currentView = newView;        } // synchronized        // Notify about coordinator changes first.        if (diff.isCoordinatorChanged())            grid.onNewCoordinator(coord);        // Create a set of JGroupsAddresses for the diff.        Set joined = toNodeAddresses(diff.getJoined());        Set left = toNodeAddresses(diff.getLeft());        // Notify all the other components about the membership change.        grid.onMembershipChange(joined, left);    }