|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.p2p.multiring.RingId
public class RingId
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface rice.p2p.commonapi.Id |
|---|
Id.Distance |
| Field Summary | |
|---|---|
protected Id |
id
The id which this ringId represents |
protected Id |
ringId
The ringId which this ringId represents |
static short |
TYPE
DESCRIBE THE FIELD |
| Constructor Summary | |
|---|---|
RingId(InputBuffer buf,
Endpoint endpoint)
Constructor for RingId. |
|
| Method Summary | |
|---|---|
Id |
addToId(Id.Distance offset)
Returns an Id corresponding to this Id plus a given distance |
static RingId |
build(Id ringId,
Id id)
Constructor. |
static RingId |
build(java.lang.String s)
Method which splits apart a ringid string and returns the RingID |
boolean |
clockwise(Id nid)
Checks to see if the Id nid is clockwise or counterclockwise from this, on the ring. |
int |
compareTo(java.lang.Object o)
Returns this id compared to the target |
Id.Distance |
distanceFromId(Id nid)
Returns the shorter numerical distance on the ring between a pair of Ids. |
boolean |
equals(java.lang.Object o)
Returns whether or not this object is equal to the provided one |
int |
getByteArrayLength()
Returns the length of the byte[] representing this Id |
Id |
getId()
Returns this ringid's id |
Id |
getRingId()
Returns this ringid's ring id |
short |
getType()
Raw Serialization ************************************** |
int |
hashCode()
Returns the hashCode |
boolean |
isBetween(Id ccw,
Id cw)
Checks if this Id is between two given ids ccw (inclusive) and cw (exclusive) on the circle |
Id.Distance |
longDistanceFromId(Id nid)
Returns the longer numerical distance on the ring between a pair of Ids. |
void |
serialize(OutputBuffer buf)
DESCRIBE THE METHOD |
byte[] |
toByteArray()
Returns a (mutable) byte array representing this Id |
void |
toByteArray(byte[] array,
int offset)
Stores the byte[] value of this Id in the provided byte array |
java.lang.String |
toString()
Returns a string representing this ring Id. |
java.lang.String |
toStringFull()
Returns a string representing the full length of this Id. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Id id
protected Id ringId
public static short TYPE
| Constructor Detail |
|---|
public RingId(InputBuffer buf,
Endpoint endpoint)
throws java.io.IOException
buf - DESCRIBE THE PARAMETERendpoint - DESCRIBE THE PARAMETER
java.io.IOException - DESCRIBE THE EXCEPTION| Method Detail |
|---|
public Id getId()
public Id getRingId()
public boolean isBetween(Id ccw,
Id cw)
isBetween in interface Idccw - the counterclockwise idcw - the clockwise id
public int getByteArrayLength()
getByteArrayLength in interface Idpublic short getType()
getType in interface Idpublic boolean clockwise(Id nid)
clockwise in interface Idnid - The id to compare to
public Id addToId(Id.Distance offset)
addToId in interface Idoffset - the distance to add
public Id.Distance distanceFromId(Id nid)
distanceFromId in interface Idnid - the other node id.
public Id.Distance longDistanceFromId(Id nid)
longDistanceFromId in interface Idnid - the other node id.
public byte[] toByteArray()
toByteArray in interface Id
public void toByteArray(byte[] array,
int offset)
toByteArray in interface Idarray - DESCRIBE THE PARAMETERoffset - DESCRIBE THE PARAMETERpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The object to compare to
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringFull()
toStringFull in interface Idpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - DESCRIBE THE PARAMETER
public void serialize(OutputBuffer buf)
throws java.io.IOException
serialize in interface Idbuf - DESCRIBE THE PARAMETER
java.io.IOException - DESCRIBE THE EXCEPTION
public static RingId build(Id ringId,
Id id)
ringId - DESCRIBE THE PARAMETERid - DESCRIBE THE PARAMETER
public static RingId build(java.lang.String s)
s - The ring to parse
|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||