|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.ViewId
public class ViewId
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.
| Constructor Summary | |
|---|---|
ViewId()
|
|
ViewId(Address coord_addr)
Creates a ViewID with the coordinator address and a Lamport timestamp of 0. |
|
ViewId(Address coord_addr,
long id)
Creates a ViewID with the coordinator address and the given Lamport timestamp. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Cloneable interface Returns a new ViewID object containing the same address and lamport timestamp as this view |
int |
compare(java.lang.Object o)
Old Compare |
int |
compareTo(java.lang.Object other)
Establishes an order between 2 ViewIds. |
ViewId |
copy()
Old Copy method, deprecated because it is substituted by clone() |
boolean |
equals(java.lang.Object other_view)
|
Address |
getCoordAddress()
returns the address of the member that issued this view |
long |
getId()
returns the lamport time of the view |
int |
hashCode()
|
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 java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ViewId()
public ViewId(Address coord_addr)
coord_addr - the address of the member that issued this view
public ViewId(Address coord_addr,
long id)
coord_addr - - the address of the member that issued this viewid - - the Lamport timestamp of the view| Method Detail |
|---|
public long getId()
public Address getCoordAddress()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic ViewId copy()
public int compareTo(java.lang.Object other)
compareTo in interface java.lang.Comparablepublic int compare(java.lang.Object o)
public boolean equals(java.lang.Object other_view)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
public void writeTo(java.io.DataOutputStream out)
throws java.io.IOException
Streamable
writeTo in interface Streamablejava.io.IOException
public void readFrom(java.io.DataInputStream in)
throws java.io.IOException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
Streamable
readFrom in interface Streamablejava.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationExceptionpublic int serializedSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||