|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.persistence.testing.MemoryStorageTest.VariableId
public class MemoryStorageTest.VariableId
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface rice.p2p.commonapi.Id |
|---|
Id.Distance |
| Field Summary | |
|---|---|
protected int |
num
|
static java.lang.String |
STRING
|
static short |
TYPE
|
| Constructor Summary | |
|---|---|
MemoryStorageTest.VariableId(int num)
|
|
| 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. |
int |
compareTo(Id o)
|
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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final short TYPE
protected int num
public static final java.lang.String STRING
| Constructor Detail |
|---|
public MemoryStorageTest.VariableId(int num)
| Method Detail |
|---|
public boolean isBetween(Id ccw,
Id cw)
Id
isBetween in interface Idccw - the counterclockwise idcw - the clockwise id
public boolean clockwise(Id nid)
Id
clockwise in interface Idnid - The id to compare to
public Id addToId(Id.Distance offset)
Id
addToId in interface Idoffset - the distance to add
public Id.Distance distanceFromId(Id nid)
Id
distanceFromId in interface Idnid - the other node id.
public Id.Distance longDistanceFromId(Id nid)
Id
longDistanceFromId in interface Idnid - the other node id.
public byte[] toByteArray()
Id
toByteArray in interface Id
public void toByteArray(byte[] array,
int offset)
Id
toByteArray in interface Idpublic int getByteArrayLength()
Id
getByteArrayLength in interface Idpublic java.lang.String toStringFull()
Id
toStringFull in interface Idpublic int compareTo(Id o)
compareTo in interface java.lang.Comparable<Id>
public void serialize(OutputBuffer buf)
throws java.io.IOException
Id
serialize in interface Idjava.io.IOExceptionpublic short getType()
getType in interface Id
|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||