|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.direct.SphereNetwork
Sphere network topology and idealized node life. Emulates a network of nodes that are randomly placed on a sphere. Proximity is based on euclidean distance on the sphere.
Constructor Summary | |
SphereNetwork()
Constructor. |
Method Summary | |
void |
deliverMessage(rice.pastry.messaging.Message msg,
rice.pastry.PastryNode node)
DESCRIBE THE METHOD |
rice.pastry.direct.DirectNodeHandle |
getClosest(rice.pastry.NodeId nid)
find the closest NodeId to an input NodeId out of all NodeIds in the network |
rice.pastry.direct.TestRecord |
getTestRecord()
get TestRecord |
boolean |
isAlive(rice.pastry.NodeId nid)
testing if a NodeId is alive |
int |
proximity(rice.pastry.NodeId a,
rice.pastry.NodeId b)
computes the proximity between two NodeIds |
void |
registerNodeId(rice.pastry.direct.DirectNodeHandle nh)
register a new node |
void |
setAlive(rice.pastry.NodeId nid,
boolean alive)
set the liveliness of a NodeId |
void |
setTestRecord(rice.pastry.direct.TestRecord tr)
set TestRecord |
boolean |
simulate()
DESCRIBE THE METHOD |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SphereNetwork()
Method Detail |
public boolean isAlive(rice.pastry.NodeId nid)
isAlive
in interface NetworkSimulator
nid
- the NodeId being tested
public rice.pastry.direct.TestRecord getTestRecord()
getTestRecord
in interface NetworkSimulator
public rice.pastry.direct.DirectNodeHandle getClosest(rice.pastry.NodeId nid)
getClosest
in interface NetworkSimulator
nid
- the input NodeId
public void setAlive(rice.pastry.NodeId nid, boolean alive)
setAlive
in interface NetworkSimulator
nid
- the NodeId being setalive
- the value being setpublic void setTestRecord(rice.pastry.direct.TestRecord tr)
setTestRecord
in interface NetworkSimulator
tr
- input TestRecordpublic void registerNodeId(rice.pastry.direct.DirectNodeHandle nh)
registerNodeId
in interface NetworkSimulator
nh
- the DirectNodeHandle being registeredpublic int proximity(rice.pastry.NodeId a, rice.pastry.NodeId b)
proximity
in interface NetworkSimulator
a
- the first NodeIdb
- the second NodeId
public void deliverMessage(rice.pastry.messaging.Message msg, rice.pastry.PastryNode node)
deliverMessage
in interface NetworkSimulator
msg
- DESCRIBE THE PARAMETERnode
- DESCRIBE THE PARAMETERpublic boolean simulate()
simulate
in interface NetworkSimulator
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |