public class ViewId extends java.lang.Object implements java.lang.Comparable<ViewId>, Streamable
| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
protected Address creator
protected long id
public ViewId()
public ViewId(Address creator)
creator - the address of the member that issued this viewpublic ViewId(Address creator, long id)
creator - - the address of the member that issued this viewid - - the Lamport timestamp of the viewpublic Address getCreator()
public long getId()
public java.lang.String toString()
toString 在类中 java.lang.Objectpublic ViewId copy()
public int compareTo(ViewId other)
compareTo 在接口中 java.lang.Comparable<ViewId>public int compareToIDs(ViewId other)
public boolean equals(java.lang.Object other)
equals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在类中 java.lang.Objectpublic void writeTo(java.io.DataOutput out)
throws java.lang.Exception
StreamablewriteTo 在接口中 Streamablejava.lang.Exceptionpublic void readFrom(java.io.DataInput in)
throws java.lang.Exception
StreamablereadFrom 在接口中 Streamablejava.lang.Exceptionpublic int serializedSize()