org.jgroups

Class MergeView

public class MergeView extends View

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 Vectorsubgroups
Constructor Summary
MergeView()
Used by externalization
MergeView(ViewId vid, Vector members, Vector subgroups)
Creates a new view
MergeView(Address creator, long id, Vector members, Vector subgroups)
Creates a new view
Method Summary
Objectclone()
creates a copy of this view
VectorgetSubgroups()
voidreadExternal(ObjectInput in)
voidreadFrom(DataInputStream in)
intserializedSize()
StringtoString()
voidwriteExternal(ObjectOutput out)
voidwriteTo(DataOutputStream out)

Field Detail

subgroups

protected Vector subgroups

Constructor Detail

MergeView

public MergeView()
Used by externalization

MergeView

public MergeView(ViewId vid, Vector members, Vector subgroups)
Creates a new view

Parameters: 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

MergeView

public MergeView(Address creator, long id, Vector members, Vector subgroups)
Creates a new view

Parameters: creator The creator of this view (can not be null) id The lamport timestamp of this view 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

Method Detail

clone

public Object clone()
creates a copy of this view

Returns: a copy of this view

getSubgroups

public Vector getSubgroups()

readExternal

public void readExternal(ObjectInput in)

readFrom

public void readFrom(DataInputStream in)

serializedSize

public int serializedSize()

toString

public String toString()

writeExternal

public void writeExternal(ObjectOutput out)

writeTo

public void writeTo(DataOutputStream out)
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.