public class View extends java.util.AbstractList<Address> implements java.lang.Comparable<View>, Streamable, java.lang.Iterable<Address>
| Modifier and Type | Field and Description | 
|---|---|
protected Address[] | 
members
An array containing all the members of the view. 
 | 
protected static boolean | 
suppress_view_size  | 
protected ViewId | 
view_id
A view is uniquely identified by its ViewID. 
 | 
| Constructor and Description | 
|---|
View()
Creates an empty view, should not be used, only used by (de-)serialization 
 | 
View(Address creator,
    long id,
    java.util.List<Address> members)
Creates a new view 
 | 
View(ViewId view_id,
    Address[] members)
Creates a new view. 
 | 
View(ViewId view_id,
    java.util.Collection<Address> members)
Creates a new view 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
compareTo(View o)  | 
boolean | 
containsMember(Address mbr)
Returns true if this view contains a certain member 
 | 
boolean | 
containsMembers(Address... mbrs)
Returns true if all mbrs are elements of this view, false otherwise 
 | 
View | 
copy()
Deprecated. 
 
View is immutable, so copy() is unnecessary 
 | 
static View | 
create(Address coord,
      long id,
      Address... members)  | 
static View | 
create(Address coord,
      long id,
      java.util.Collection<Address> members)  | 
boolean | 
deepEquals(View other)  | 
static Address[][] | 
diff(View from,
    View to)
Returns the difference between 2 views from and to. 
 | 
boolean | 
equals(java.lang.Object obj)  | 
Address | 
get(int index)  | 
Address | 
getCoord()  | 
Address | 
getCreator()
Returns the creator of this view
 if this view was created with the empty constructur, null will be returned 
 | 
java.util.List<Address> | 
getMembers()
Returns the member list 
 | 
Address[] | 
getMembersRaw()
Returns the underlying array. 
 | 
ViewId | 
getVid()
Deprecated.  
 | 
ViewId | 
getViewId()
Returns the view ID of this view
 if this view was created with the empty constructur, null will be returned 
 | 
int | 
hashCode()  | 
java.util.Iterator<Address> | 
iterator()  | 
static java.util.List<Address> | 
leftMembers(View one,
           View two)
Returns a list of members which left from view one to two 
 | 
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()  | 
int | 
size()
Returns the number of members in this view 
 | 
java.lang.String | 
toString()  | 
void | 
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream. 
 | 
add, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected ViewId view_id
protected Address[] members
protected static final boolean suppress_view_size
public View()
public View(ViewId view_id, java.util.Collection<Address> members)
view_id - 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.public View(ViewId view_id, Address[] members)
view_id - The new view-idmembers - The members. Note that the parameter is not copied.@Deprecated public ViewId getVid()
public ViewId getViewId()
public Address getCreator()
public Address getCoord()
public java.util.List<Address> getMembers()
public Address[] getMembersRaw()
public boolean containsMember(Address mbr)
mbr - - the address of the member,public boolean containsMembers(Address... mbrs)
public int compareTo(View o)
compareTo in interface java.lang.Comparable<View>public boolean equals(java.lang.Object obj)
public boolean deepEquals(View other)
public int hashCode()
public int size()
@Deprecated public View copy()
public java.lang.String toString()
toString in class java.util.AbstractCollection<Address>public void writeTo(java.io.DataOutput out)
             throws java.lang.Exception
StreamablewriteTo in interface Streamablejava.lang.Exceptionpublic void readFrom(java.io.DataInput in)
              throws java.lang.Exception
StreamablereadFrom in interface Streamablejava.lang.Exceptionpublic int serializedSize()
public static java.util.List<Address> leftMembers(View one, View two)
one - two - public static Address[][] diff(View from, View to)
from - The first viewto - The second viewpublic java.util.Iterator<Address> iterator()
Copyright © 1998-2020 Red Hat. All Rights Reserved.