|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NetworkSimulator
Interface to an object which is simulating the network.
Method Detail |
---|
Environment getEnvironment()
boolean isAlive(DirectNodeHandle nh)
nid
- a node id.
float proximity(DirectNodeHandle a, DirectNodeHandle b)
a
- a node id.b
- another node id.
float networkDelay(DirectNodeHandle a, DirectNodeHandle b)
a
- a node id.b
- another node id.
void setTestRecord(TestRecord tr)
TestRecord getTestRecord()
DirectNodeHandle getClosest(DirectNodeHandle nh)
nid
-
void destroy(DirectPastryNode dpn)
NodeRecord generateNodeRecord()
void removeNode(TLPastryNode node)
nh
- the node handle to register.void start()
void stop()
CancellableTask enqueueDelivery(Delivery del, int delay)
msg
- message to deliver.node
- the Pastry node to deliver it to.how
- long to delay to deliver the messageperiod
- to deliver the message after the delayvoid setMaxSpeed(float rate)
the
- multiple on realtime that the simulator is allowed to run at,
zero or less will cause no bound on the simulation speedvoid setFullSpeed()
void notifySimulatorListenersSent(Message m, NodeHandle from, NodeHandle to, int delay)
m
- the messagefrom
- the sourceto
- the destinationdelay
- the network proximity (when the message will be received)void notifySimulatorListenersReceived(Message m, NodeHandle from, NodeHandle to)
m
- the messagefrom
- the sourceto
- the destinationboolean addSimulatorListener(SimulatorListener sl)
sl
-
boolean removeSimulatorListener(SimulatorListener sl)
sl
-
NodeRecord getNodeRecord(DirectNodeHandle handle)
LivenessProvider<NodeHandle> getLivenessProvider()
GenericNetworkSimulator<NodeHandle,RawMessage> getGenericSimulator()
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |