|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.View
org.jgroups.MergeView
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).
Field Summary | |
protected java.util.Vector |
subgroups
|
Fields inherited from class org.jgroups.View |
members, vid |
Constructor Summary | |
MergeView()
Used by externalization |
|
MergeView(Address creator,
long id,
java.util.Vector members,
java.util.Vector subgroups)
Creates a new view |
|
MergeView(ViewId vid,
java.util.Vector members,
java.util.Vector subgroups)
Creates a new view |
Method Summary | |
java.lang.Object |
clone()
creates a copy of this view |
java.util.Vector |
getSubgroups()
|
void |
readExternal(java.io.ObjectInput in)
|
void |
readFrom(java.io.DataInputStream 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 |
writeExternal(java.io.ObjectOutput out)
|
void |
writeTo(java.io.DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream. |
Methods inherited from class org.jgroups.View |
containsMember, equals, getCreator, getMembers, getVid, printDetails, size |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Vector subgroups
Constructor Detail |
public MergeView()
public MergeView(ViewId vid, java.util.Vector members, java.util.Vector subgroups)
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 subgroupspublic MergeView(Address creator, long id, java.util.Vector members, java.util.Vector subgroups)
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 subgroupsMethod Detail |
public java.util.Vector getSubgroups()
public java.lang.Object clone()
clone
in class View
public java.lang.String toString()
toString
in class View
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class View
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class View
java.io.IOException
java.lang.ClassNotFoundException
public void writeTo(java.io.DataOutputStream out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class View
java.io.IOException
public void readFrom(java.io.DataInputStream in) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException
Streamable
readFrom
in interface Streamable
readFrom
in class View
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
public int serializedSize()
serializedSize
in class View
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |