public class ViewId extends Object implements Comparable<ViewId>, SizeStreamable, Constructable<ViewId>
Modifier and Type | Field and Description |
---|---|
protected Address |
creator |
protected long |
id |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ViewId other)
Establishes an order between 2 ViewIds.
|
int |
compareToIDs(ViewId other)
Establishes an order between 2 ViewIds.
|
ViewId |
copy() |
Supplier<? extends ViewId> |
create()
Creates an instance of the class implementing this interface
|
boolean |
equals(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(DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
int |
serializedSize()
Returns the size (in bytes) of the marshalled object
|
String |
toString() |
void |
writeTo(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 Supplier<? extends ViewId> create()
Constructable
create
in interface Constructable<ViewId>
public Address getCreator()
public long getId()
public ViewId copy()
public int compareTo(ViewId other)
compareTo
in interface Comparable<ViewId>
public int compareToIDs(ViewId other)
public void writeTo(DataOutput out) throws Exception
Streamable
writeTo
in interface Streamable
Exception
public void readFrom(DataInput in) throws Exception
Streamable
readFrom
in interface Streamable
Exception
public int serializedSize()
SizeStreamable
serializedSize
in interface SizeStreamable
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.