|
||||||||||
| 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.
| Field Summary | |
|---|---|
protected Address |
creator
|
protected long |
id
|
| Constructor Summary | |
|---|---|
ViewId()
|
|
ViewId(Address creator)
Creates a ViewID with the coordinator address and a Lamport timestamp of 0. |
|
ViewId(Address creator,
long id)
Creates a ViewID with the coordinator address and the given Lamport timestamp. |
|
| Method Summary | |
|---|---|
int |
compareTo(ViewId other)
Establishes an order between 2 ViewIds. |
int |
compareToIDs(ViewId other)
Establishes an order between 2 ViewIds. |
ViewId |
copy()
|
boolean |
equals(java.lang.Object other)
|
Address |
getCreator()
Returns the address of the member that issued this view |
long |
getId()
returns the lamport time of the view |
int |
hashCode()
|
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()
|
java.lang.String |
toString()
|
void |
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Address creator
protected long id
| Constructor Detail |
|---|
public ViewId()
public ViewId(Address creator)
creator - the address of the member that issued this view
public ViewId(Address creator,
long id)
creator - - the address of the member that issued this viewid - - the Lamport timestamp of the view| Method Detail |
|---|
public Address getCreator()
public long getId()
public java.lang.String toString()
toString in class java.lang.Objectpublic ViewId copy()
public int compareTo(ViewId other)
compareTo in interface java.lang.Comparable<ViewId>public int compareToIDs(ViewId other)
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
public void writeTo(java.io.DataOutput out)
throws java.lang.Exception
Streamable
writeTo in interface Streamablejava.lang.Exception
public void readFrom(java.io.DataInput in)
throws java.lang.Exception
Streamable
readFrom in interface Streamablejava.lang.Exceptionpublic int serializedSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||