@Override
public void viewAccepted(View view)
{
if (this.membershipListener != null)
{
View oldView = this.viewReference.getAndSet(view);
for (Address address: view.getMembers())
{
if ((oldView == null) || !oldView.containsMember(address))
{
this.membershipListener.added(new AddressMember(address));
}
}
if (oldView != null)
{
for (Address address: oldView.getMembers())
{
if (!view.containsMember(address))
{
this.membershipListener.removed(new AddressMember(address));
}