|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.pastry.direct.EuclideanNetwork
Euclidean network topology and idealized node life. Emulates a network of nodes that are randomly placed in a plane. Proximity is based on euclidean distance in the plane.
| Constructor Summary | |
EuclideanNetwork()
Constructor. |
|
| Method Summary | |
void |
deliverMessage(Message msg,
PastryNode node)
DESCRIBE THE METHOD |
DirectNodeHandle |
getClosest(NodeId nid)
find the closest NodeId to an input NodeId out of all NodeIds in the network |
TestRecord |
getTestRecord()
get TestRecord |
boolean |
isAlive(NodeId nid)
testing if a NodeId is alive |
int |
proximity(NodeId a,
NodeId b)
computes the proximity between two NodeIds |
void |
registerNodeId(DirectNodeHandle nh)
register a new node |
void |
setAlive(NodeId nid,
boolean alive)
set the liveliness of a NodeId |
void |
setTestRecord(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 EuclideanNetwork()
| Method Detail |
public boolean isAlive(NodeId nid)
isAlive in interface NetworkSimulatornid - the NodeId being tested
public TestRecord getTestRecord()
getTestRecord in interface NetworkSimulatorpublic DirectNodeHandle getClosest(NodeId nid)
getClosest in interface NetworkSimulatornid - the input NodeId
public void setAlive(NodeId nid,
boolean alive)
setAlive in interface NetworkSimulatornid - the NodeId being setalive - the value being setpublic void setTestRecord(TestRecord tr)
setTestRecord in interface NetworkSimulatortr - input TestRecordpublic void registerNodeId(DirectNodeHandle nh)
registerNodeId in interface NetworkSimulatornh - the DirectNodeHandle being registered
public int proximity(NodeId a,
NodeId b)
proximity in interface NetworkSimulatora - the first NodeIdb - the second NodeId
public void deliverMessage(Message msg,
PastryNode node)
deliverMessage in interface NetworkSimulatormsg - DESCRIBE THE PARAMETERnode - DESCRIBE THE PARAMETERpublic boolean simulate()
simulate in interface NetworkSimulator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||