public class ViewId extends java.lang.Object implements java.io.Externalizable, java.lang.Comparable, java.lang.Cloneable, Streamable
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ViewId()
public ViewId(Address coord_addr)
coord_addr - the address of the member that issued this viewpublic ViewId(Address coord_addr, long id)
coord_addr - - the address of the member that issued this viewid - - the Lamport timestamp of the viewpublic 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.Objectpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void writeTo(java.io.DataOutputStream out)
throws java.io.IOException
StreamablewriteTo in interface Streamablejava.io.IOExceptionpublic void readFrom(java.io.DataInputStream in)
throws java.io.IOException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
StreamablereadFrom in interface Streamablejava.io.IOExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionpublic int serializedSize()
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.