public class DeltaView extends View
View
with a null members field. Adds an array for left members and one for joined
members compared to the previous view. A recipient receiving a DeltaView can construct a new view by grabbing the
view corresponding to View.view_id
, removing the left members and adding the new members.
This class is only used with VIEW messages in GMS to install new views (not merge views). When a VIEW
message is received, the DeltaView is read from the GMS.GmsHeader
, a View is
constructured and the header discarded. Therefore, the lifetime of a DeltaView is short: it is created and set in
a GmsHeader, the header is then marshalled. On the receiving side, the DeltaView is created from the stream, a View
is created and the DeltaView discarded again.
Instances of this class are created by CoordGmsImpl.handleMembershipChange(java.util.Collection)
.
JIRA issue: https://issues.jboss.org/browse/JGRP-1354Modifier and Type | Field and Description |
---|---|
protected Address[] |
left_members
Members which left the view corresponding to ref_view_id
|
protected Address[] |
new_members
Members which joined the view corresponding to ref_view_id
|
protected ViewId |
ref_view_id
The fields left_members and new_members refer to the view corresponding to ref_view_id
|
members, suppress_view_size, view_id
Constructor and Description |
---|
DeltaView() |
DeltaView(ViewId view_id,
ViewId ref_view_id,
Address[] left_members,
Address[] new_members) |
Modifier and Type | Method and Description |
---|---|
Address[] |
getLeftMembers() |
Address[] |
getNewMembers() |
ViewId |
getRefViewId() |
java.util.Iterator<Address> |
iterator() |
void |
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
int |
serializedSize() |
java.lang.String |
toString() |
void |
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
compareTo, containsMember, containsMembers, copy, create, create, deepEquals, diff, equals, get, getCoord, getCreator, getMembers, getMembersRaw, getVid, getViewId, hashCode, leftMembers, size
add, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected ViewId ref_view_id
protected Address[] left_members
protected Address[] new_members
public ViewId getRefViewId()
public Address[] getLeftMembers()
public Address[] getNewMembers()
public int serializedSize()
serializedSize
in class View
public void writeTo(java.io.DataOutput out) throws java.lang.Exception
Streamable
writeTo
in interface Streamable
writeTo
in class View
java.lang.Exception
public void readFrom(java.io.DataInput in) throws java.lang.Exception
Streamable
readFrom
in interface Streamable
readFrom
in class View
java.lang.Exception
public java.util.Iterator<Address> iterator()
Copyright © 1998-2020 Red Hat. All Rights Reserved.