org.jgroups
Class MergeView
- Cloneable, Externalizable, Streamable
A view that is sent as a result of a merge.
Whenever a group splits into subgroups, e.g., due to a network partition,
and later the subgroups merge back together, a MergeView instead of a View
will be received by the application. The MergeView class is a subclass of
View and contains as additional instance variable: the list of views that
were merged. For example, if the group denoted by view V1:(p,q,r,s,t)
splits into subgroups V2:(p,q,r) and V2:(s,t), the merged view might be
V3:(p,q,r,s,t). In this case the MergeView would contain a list of 2 views:
V2:(p,q,r) and V2:(s,t).
Object | clone() - creates a copy of this view
|
Vector | getSubgroups()
|
void | readExternal(ObjectInput in)
|
void | readFrom(DataInputStream in) - Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
int | serializedSize()
|
String | toString()
|
void | writeExternal(ObjectOutput out)
|
void | writeTo(DataOutputStream out) - Write the entire state of the current object (including superclasses) to outstream.
|
clone , containsMember , equals , getCreator , getMembers , getVid , printDetails , readExternal , readFrom , serializedSize , size , toString , writeExternal , writeTo |
subgroups
protected Vector subgroups
MergeView
public MergeView()
Used by externalization
MergeView
public MergeView(Address creator,
long id,
Vector members,
Vector subgroups)
Creates a new view
creator
- The creator of this view (can not be null)id
- The lamport timestamp of this viewmembers
- Contains a list of all the members in the view, can be empty but not null.subgroups
- A list of Views representing the former subgroups
MergeView
public MergeView(ViewId vid,
Vector members,
Vector subgroups)
Creates a new view
vid
- The view id of this view (can not be null)members
- Contains a list of all the members in the view, can be empty but not null.subgroups
- A list of Views representing the former subgroups
clone
public Object clone()
creates a copy of this view
- clone in interface View
getSubgroups
public Vector getSubgroups()
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- readExternal in interface View
readFrom
public void readFrom(DataInputStream in)
throws IOException,
IllegalAccessException,
InstantiationException
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
- readFrom in interface Streamable
- readFrom in interface View
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- writeExternal in interface View
writeTo
public void writeTo(DataOutputStream out)
throws IOException
Write the entire state of the current object (including superclasses) to outstream.
Note that the output stream must not be closed
- writeTo in interface Streamable
- writeTo in interface View
Copyright B) 1998-2005 Bela Ban. All Rights Reserved.