|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--ostore.util.NodeId
Abstract node identifier. Currently we use 32-bit IPv4 addressed.
| Nested Class Summary | |
|---|---|
class |
NodeId.BadFormat
|
| Field Summary | |
|---|---|
static boolean |
DEBUG
|
| Constructor Summary | |
|---|---|
NodeId()
|
|
NodeId(InputBuffer buffer)
|
|
NodeId(int port,
InetAddress addr)
Construct a new NodeId. |
|
NodeId(String peer)
Read this NodeId in from a string of the same format as produced by toString (), below. |
|
| Method Summary | |
|---|---|
InetAddress |
address()
Return the InetAddress associated with this NodeId; does not work under the simulator. |
Object |
clone()
Create an exact copy of this NodeId |
int |
compareTo(Object other)
Specified by the Comparable interface. |
boolean |
equals(Object other)
|
int |
hashCode()
|
boolean |
less_than(NodeId other)
a.less_than (b) returns true iff a is less
than b. |
int |
port()
|
void |
serialize(OutputBuffer buffer)
Add the object to the buffer. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final boolean DEBUG
| Constructor Detail |
public NodeId(int port,
InetAddress addr)
port - The network port; must be between 0 and 65535 inclusive.addr - The IP address
public NodeId(String peer)
throws NodeId.BadFormat,
UnknownHostException
public NodeId()
public NodeId(InputBuffer buffer)
throws QSException
| Method Detail |
public void serialize(OutputBuffer buffer)
QuickSerializablebuffer.
serialize in interface QuickSerializablebuffer - the output buffer to add the object topublic InetAddress address()
JUST TO MAKE THAT CLEAR, THIS FUNCTION WILL NOT WORK IN THE OCEANSTORE SIMULATOR. YOU HAVE BEEN WARNED.
public int port()
public String toString()
toString in class Objectpublic int compareTo(Object other)
Comparable interface.
compareTo in interface Comparablepublic boolean equals(Object other)
equals in class Objectpublic boolean less_than(NodeId other)
a.less_than (b) returns true iff a is less
than b. Used for sorting NodeIds.
public int hashCode()
hashCode in class Object
public Object clone()
throws CloneNotSupportedException
NodeId
clone in class ObjectNodeId identical in value to this one
CloneNotSupportedException - if clone() is not supported
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||