org.jgroups
public class View extends Object implements Externalizable, Cloneable, Streamable
Field Summary | |
---|---|
protected Vector | members
A list containing all the members of the view
This list is always ordered, with the coordinator being the first member.
the second member will be the new coordinator if the current one disappears
or leaves the group. |
protected ViewId | vid |
Constructor Summary | |
---|---|
View()
creates an empty view, should not be used | |
View(ViewId vid, Vector members)
Creates a new view
| |
View(Address creator, long id, Vector members)
Creates a new view
|
Method Summary | |
---|---|
Object | clone()
creates a copy of this view
|
boolean | containsMember(Address mbr)
returns true, if this view contains a certain member
|
boolean | equals(Object obj) |
Address | getCreator()
returns the creator of this view
if this view was created with the empty constructur, null will be returned
|
Vector | getMembers()
Returns a reference to the List of members (ordered)
Do NOT change this list, hence your will invalidate the view
Make a copy if you have to modify it.
|
ViewId | getVid()
returns the view ID of this view
if this view was created with the empty constructur, null will be returned
|
String | printDetails()
debug only |
void | readExternal(ObjectInput in) |
void | readFrom(DataInputStream in) |
int | serializedSize() |
int | size()
returns the number of members in this view
|
String | toString() |
void | writeExternal(ObjectOutput out) |
void | writeTo(DataOutputStream out) |
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.
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.
Returns: a copy of this view
Parameters: mbr - the address of the member,
Returns: true if this view contains the member, false if it doesn't if the argument mbr is null, this operation returns false
Returns: the creator of this view in form of an Address object
Returns: a reference to the ordered list of members in this view
Returns: the view ID of this view
Returns: the number of members in this view 0..n