|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Id
Nested Class Summary | |
---|---|
static interface |
Id.Distance
A class for representing and manipulating the distance between two Ids on the circle. |
Method Summary | |
---|---|
Id |
addToId(Id.Distance offset)
Returns an Id corresponding to this Id plus a given distance |
boolean |
clockwise(Id nid)
Checks to see if the Id nid is clockwise or counterclockwise from this, on the ring. |
Id.Distance |
distanceFromId(Id nid)
Returns the shorter numerical distance on the ring between a pair of Ids. |
int |
getByteArrayLength()
Returns the length of the byte[] representing this Id |
short |
getType()
|
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)
Serialize |
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 |
toStringFull()
Returns a string representing the full length of this Id. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
boolean isBetween(Id ccw, Id cw)
ccw
- the counterclockwise idcw
- the clockwise id
boolean clockwise(Id nid)
nid
- The id to compare to
Id addToId(Id.Distance offset)
offset
- the distance to add
Id.Distance distanceFromId(Id nid)
nid
- the other node id.
Id.Distance longDistanceFromId(Id nid)
nid
- the other node id.
byte[] toByteArray()
void toByteArray(byte[] array, int offset)
int getByteArrayLength()
java.lang.String toStringFull()
void serialize(OutputBuffer buf) throws java.io.IOException
buf
-
java.io.IOException
short getType()
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |