JavaGroups
Class ViewId
java.lang.Object
|
+--JavaGroups.ViewId
- public class ViewId
- extends java.lang.Object
- implements java.io.Serializable
ViewIds are used for ordering views (each view has a ViewId and a list of members).
Ordering between views is important for example in a virtual synchrony protocol where
all views seen by a member have to be ordered.
- See Also:
- Serialized Form
|
Constructor Summary |
ViewId(java.lang.Object coord_addr)
|
ViewId(java.lang.Object coord_addr,
long id)
|
| Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
ViewId
public ViewId(java.lang.Object coord_addr)
ViewId
public ViewId(java.lang.Object coord_addr,
long id)
GetId
public long GetId()
SetId
public void SetId(long new_id)
- Deprecated. Since ViewIds should be immutable, this method will be removed soon !
GetCoordAddress
public java.lang.Object GetCoordAddress()
SetCoordAddress
public void SetCoordAddress(java.lang.Object new_addr)
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
Copy
public ViewId Copy()
Compare
public int Compare(ViewId other)
- Establishes an order between 2 ViewIds. First compare on id. Compare on coord_addr
only if necessary (i.e. ids are equal) !
- Returns:
- 0 for equality, value less than 0 if smaller, greater than 0 if greater.
equals
public boolean equals(java.lang.Object other_view)
- Overrides:
- equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
- hashCode in class java.lang.Object
main
public static void main(java.lang.String[] args)