public class ViewId extends Object implements Externalizable, Comparable, 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 |
---|---|
Object |
clone()
Cloneable interface
Returns a new ViewID object containing the same address and lamport timestamp as this view
|
int |
compare(Object o)
Old Compare
|
int |
compareTo(Object other)
Establishes an order between 2 ViewIds.
|
ViewId |
copy()
Old Copy method, deprecated because it is substituted by clone()
|
boolean |
equals(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(ObjectInput in) |
void |
readFrom(DataInputStream in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
int |
serializedSize() |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
void |
writeTo(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 Object clone()
public ViewId copy()
public int compareTo(Object other)
compareTo
in interface Comparable
public int compare(Object o)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeTo(DataOutputStream out) throws IOException
Streamable
writeTo
in interface Streamable
IOException
public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException
Streamable
readFrom
in interface Streamable
IOException
IllegalAccessException
InstantiationException
public int serializedSize()
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.