mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 01:26:27 +00:00
703 lines
34 KiB
HTML
703 lines
34 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.6.0_07) on Fri Mar 13 20:01:27 CET 2009 -->
|
|
<TITLE>
|
|
NetworkSimulator (Rice Pastry - API Specifications)
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2009-03-13">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="NetworkSimulator (Rice Pastry - API Specifications)";
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
<HR>
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NetworkSimulator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
Rice Pastry API</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulatorImpl.html" title="class in rice.pastry.direct"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/pastry/direct/NetworkSimulator.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="NetworkSimulator.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
rice.pastry.direct</FONT>
|
|
<BR>
|
|
Interface NetworkSimulator<Identifier,MessageType></H2>
|
|
<DL>
|
|
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../rice/pastry/direct/EuclideanNetwork.html" title="class in rice.pastry.direct">EuclideanNetwork</A>, <A HREF="../../../rice/pastry/direct/GenericNetwork.html" title="class in rice.pastry.direct">GenericNetwork</A>, <A HREF="../../../rice/pastry/direct/NetworkSimulatorImpl.html" title="class in rice.pastry.direct">NetworkSimulatorImpl</A>, <A HREF="../../../rice/pastry/direct/SphereNetwork.html" title="class in rice.pastry.direct">SphereNetwork</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public interface <B>NetworkSimulator<Identifier,MessageType></B></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
Interface to an object which is simulating the network.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Version:</B></DT>
|
|
<DD>$Id: NetworkSimulator.java 4221 2008-05-19 16:41:19Z jeffh $</DD>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Andrew Ladd</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#addSimulatorListener(rice.pastry.direct.GenericSimulatorListener)">addSimulatorListener</A></B>(<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct">GenericSimulatorListener</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>> sl)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#destroy(rice.pastry.direct.DirectPastryNode)">destroy</A></B>(<A HREF="../../../rice/pastry/direct/DirectPastryNode.html" title="class in rice.pastry.direct">DirectPastryNode</A> dpn)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/p2p/commonapi/CancellableTask.html" title="interface in rice.p2p.commonapi">CancellableTask</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#enqueueDelivery(org.mpisws.p2p.transport.direct.Delivery, int)">enqueueDelivery</A></B>(<A HREF="../../../org/mpisws/p2p/transport/direct/Delivery.html" title="interface in org.mpisws.p2p.transport.direct">Delivery</A> del,
|
|
int delay)</CODE>
|
|
|
|
<BR>
|
|
Deliver message.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#generateNodeRecord()">generateNodeRecord</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Generates a random node record</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/direct/DirectNodeHandle.html" title="class in rice.pastry.direct">DirectNodeHandle</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getClosest(rice.pastry.direct.DirectNodeHandle)">getClosest</A></B>(<A HREF="../../../rice/pastry/direct/DirectNodeHandle.html" title="class in rice.pastry.direct">DirectNodeHandle</A> nh)</CODE>
|
|
|
|
<BR>
|
|
Returns the closest Node in proximity.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getEnvironment()">getEnvironment</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../org/mpisws/p2p/transport/direct/GenericNetworkSimulator.html" title="interface in org.mpisws.p2p.transport.direct">GenericNetworkSimulator</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getGenericSimulator()">getGenericSimulator</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../org/mpisws/p2p/transport/liveness/LivenessProvider.html" title="interface in org.mpisws.p2p.transport.liveness">LivenessProvider</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getLivenessProvider()">getLivenessProvider</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getNodeRecord(rice.pastry.direct.DirectNodeHandle)">getNodeRecord</A></B>(<A HREF="../../../rice/pastry/direct/DirectNodeHandle.html" title="class in rice.pastry.direct">DirectNodeHandle</A> handle)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/direct/TestRecord.html" title="class in rice.pastry.direct">TestRecord</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getTestRecord()">getTestRecord</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#isAlive(Identifier)">isAlive</A></B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> nh)</CODE>
|
|
|
|
<BR>
|
|
Checks to see if a node id is alive.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> float</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#networkDelay(Identifier, Identifier)">networkDelay</A></B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> a,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> b)</CODE>
|
|
|
|
<BR>
|
|
Determines delivery time from a to b.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#notifySimulatorListenersReceived(MessageType, Identifier, Identifier)">notifySimulatorListenersReceived</A></B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A> m,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> from,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> to)</CODE>
|
|
|
|
<BR>
|
|
Call this when a message is received.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#notifySimulatorListenersSent(MessageType, Identifier, Identifier, int)">notifySimulatorListenersSent</A></B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A> m,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> from,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> to,
|
|
int delay)</CODE>
|
|
|
|
<BR>
|
|
Call this when a message is sent.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> float</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#proximity(Identifier, Identifier)">proximity</A></B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> a,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> b)</CODE>
|
|
|
|
<BR>
|
|
Determines rtt between two nodes.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#registerNode(Identifier, org.mpisws.p2p.transport.direct.DirectTransportLayer, rice.pastry.direct.NodeRecord)">registerNode</A></B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> i,
|
|
<A HREF="../../../org/mpisws/p2p/transport/direct/DirectTransportLayer.html" title="class in org.mpisws.p2p.transport.direct">DirectTransportLayer</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>> dtl,
|
|
<A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A> nr)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#removeNode(rice.pastry.PastryNode)">removeNode</A></B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> node)</CODE>
|
|
|
|
<BR>
|
|
Registers a node handle with the simulator.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#removeSimulatorListener(rice.pastry.direct.GenericSimulatorListener)">removeSimulatorListener</A></B>(<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct">GenericSimulatorListener</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>> sl)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#setFullSpeed()">setFullSpeed</A></B>()</CODE>
|
|
|
|
<BR>
|
|
unlimited maxSpeed</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#setMaxSpeed(float)">setMaxSpeed</A></B>(float rate)</CODE>
|
|
|
|
<BR>
|
|
The max rate of the simulator compared to realtime.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#setTestRecord(rice.pastry.direct.TestRecord)">setTestRecord</A></B>(<A HREF="../../../rice/pastry/direct/TestRecord.html" title="class in rice.pastry.direct">TestRecord</A> tr)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#start()">start</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#stop()">stop</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="getEnvironment()"><!-- --></A><H3>
|
|
getEnvironment</H3>
|
|
<PRE>
|
|
<A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> <B>getEnvironment</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isAlive(java.lang.Object)"><!-- --></A><A NAME="isAlive(Identifier)"><!-- --></A><H3>
|
|
isAlive</H3>
|
|
<PRE>
|
|
boolean <B>isAlive</B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> nh)</PRE>
|
|
<DL>
|
|
<DD>Checks to see if a node id is alive.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> - a node id.
|
|
<DT><B>Returns:</B><DD>true if alive, false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="proximity(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="proximity(Identifier, Identifier)"><!-- --></A><H3>
|
|
proximity</H3>
|
|
<PRE>
|
|
float <B>proximity</B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> a,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> b)</PRE>
|
|
<DL>
|
|
<DD>Determines rtt between two nodes.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>a</CODE> - a node id.<DD><CODE>b</CODE> - another node id.
|
|
<DT><B>Returns:</B><DD>proximity of b to a.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="networkDelay(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="networkDelay(Identifier, Identifier)"><!-- --></A><H3>
|
|
networkDelay</H3>
|
|
<PRE>
|
|
float <B>networkDelay</B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> a,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> b)</PRE>
|
|
<DL>
|
|
<DD>Determines delivery time from a to b.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>a</CODE> - a node id.<DD><CODE>b</CODE> - another node id.
|
|
<DT><B>Returns:</B><DD>proximity of b to a.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setTestRecord(rice.pastry.direct.TestRecord)"><!-- --></A><H3>
|
|
setTestRecord</H3>
|
|
<PRE>
|
|
void <B>setTestRecord</B>(<A HREF="../../../rice/pastry/direct/TestRecord.html" title="class in rice.pastry.direct">TestRecord</A> tr)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getTestRecord()"><!-- --></A><H3>
|
|
getTestRecord</H3>
|
|
<PRE>
|
|
<A HREF="../../../rice/pastry/direct/TestRecord.html" title="class in rice.pastry.direct">TestRecord</A> <B>getTestRecord</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getClosest(rice.pastry.direct.DirectNodeHandle)"><!-- --></A><H3>
|
|
getClosest</H3>
|
|
<PRE>
|
|
<A HREF="../../../rice/pastry/direct/DirectNodeHandle.html" title="class in rice.pastry.direct">DirectNodeHandle</A> <B>getClosest</B>(<A HREF="../../../rice/pastry/direct/DirectNodeHandle.html" title="class in rice.pastry.direct">DirectNodeHandle</A> nh)</PRE>
|
|
<DL>
|
|
<DD>Returns the closest Node in proximity.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> -
|
|
<DT><B>Returns:</B><DD></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="destroy(rice.pastry.direct.DirectPastryNode)"><!-- --></A><H3>
|
|
destroy</H3>
|
|
<PRE>
|
|
void <B>destroy</B>(<A HREF="../../../rice/pastry/direct/DirectPastryNode.html" title="class in rice.pastry.direct">DirectPastryNode</A> dpn)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="generateNodeRecord()"><!-- --></A><H3>
|
|
generateNodeRecord</H3>
|
|
<PRE>
|
|
<A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A> <B>generateNodeRecord</B>()</PRE>
|
|
<DL>
|
|
<DD>Generates a random node record
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="removeNode(rice.pastry.PastryNode)"><!-- --></A><H3>
|
|
removeNode</H3>
|
|
<PRE>
|
|
void <B>removeNode</B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> node)</PRE>
|
|
<DL>
|
|
<DD>Registers a node handle with the simulator.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>nh</CODE> - the node handle to register.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="start()"><!-- --></A><H3>
|
|
start</H3>
|
|
<PRE>
|
|
void <B>start</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="stop()"><!-- --></A><H3>
|
|
stop</H3>
|
|
<PRE>
|
|
void <B>stop</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="enqueueDelivery(org.mpisws.p2p.transport.direct.Delivery, int)"><!-- --></A><H3>
|
|
enqueueDelivery</H3>
|
|
<PRE>
|
|
<A HREF="../../../rice/p2p/commonapi/CancellableTask.html" title="interface in rice.p2p.commonapi">CancellableTask</A> <B>enqueueDelivery</B>(<A HREF="../../../org/mpisws/p2p/transport/direct/Delivery.html" title="interface in org.mpisws.p2p.transport.direct">Delivery</A> del,
|
|
int delay)</PRE>
|
|
<DL>
|
|
<DD>Deliver message.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>msg</CODE> - message to deliver.<DD><CODE>node</CODE> - the Pastry node to deliver it to.<DD><CODE>how</CODE> - long to delay to deliver the message<DD><CODE>period</CODE> - to deliver the message after the delay</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setMaxSpeed(float)"><!-- --></A><H3>
|
|
setMaxSpeed</H3>
|
|
<PRE>
|
|
void <B>setMaxSpeed</B>(float rate)</PRE>
|
|
<DL>
|
|
<DD>The max rate of the simulator compared to realtime.
|
|
|
|
The rule is that the simulated clock will not be set to a value greater
|
|
than the factor from system-time that the call was made. Thus
|
|
|
|
if 1 hour ago, you said the simulator should run at 10x realtime the simulated
|
|
clock will only have advanced 10 hours.
|
|
|
|
Note that if the simulator cannot keep up with the system clock in the early
|
|
part, it may move faster than the value you set to "catch up"
|
|
|
|
To prevent this speed-up from becoming unbounded, you may wish to call
|
|
setMaxSpeed() periodically or immediately after periods of expensive calculations.
|
|
|
|
Setting the simulation speed to zero will not pause the simulation, you must
|
|
call stop() to do that.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>the</CODE> - multiple on realtime that the simulator is allowed to run at,
|
|
zero or less will cause no bound on the simulation speed</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setFullSpeed()"><!-- --></A><H3>
|
|
setFullSpeed</H3>
|
|
<PRE>
|
|
void <B>setFullSpeed</B>()</PRE>
|
|
<DL>
|
|
<DD>unlimited maxSpeed
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="notifySimulatorListenersSent(java.lang.Object,java.lang.Object,java.lang.Object,int)"><!-- --></A><A NAME="notifySimulatorListenersSent(MessageType, Identifier, Identifier, int)"><!-- --></A><H3>
|
|
notifySimulatorListenersSent</H3>
|
|
<PRE>
|
|
void <B>notifySimulatorListenersSent</B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A> m,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> from,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> to,
|
|
int delay)</PRE>
|
|
<DL>
|
|
<DD>Call this when a message is sent.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>m</CODE> - the message<DD><CODE>from</CODE> - the source<DD><CODE>to</CODE> - the destination<DD><CODE>delay</CODE> - the network proximity (when the message will be received)</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="notifySimulatorListenersReceived(java.lang.Object,java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="notifySimulatorListenersReceived(MessageType, Identifier, Identifier)"><!-- --></A><H3>
|
|
notifySimulatorListenersReceived</H3>
|
|
<PRE>
|
|
void <B>notifySimulatorListenersReceived</B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A> m,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> from,
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> to)</PRE>
|
|
<DL>
|
|
<DD>Call this when a message is received.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>m</CODE> - the message<DD><CODE>from</CODE> - the source<DD><CODE>to</CODE> - the destination</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="addSimulatorListener(rice.pastry.direct.GenericSimulatorListener)"><!-- --></A><H3>
|
|
addSimulatorListener</H3>
|
|
<PRE>
|
|
boolean <B>addSimulatorListener</B>(<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct">GenericSimulatorListener</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>> sl)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>sl</CODE> -
|
|
<DT><B>Returns:</B><DD>true if added, false if already a listener</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="removeSimulatorListener(rice.pastry.direct.GenericSimulatorListener)"><!-- --></A><H3>
|
|
removeSimulatorListener</H3>
|
|
<PRE>
|
|
boolean <B>removeSimulatorListener</B>(<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct">GenericSimulatorListener</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>> sl)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>sl</CODE> -
|
|
<DT><B>Returns:</B><DD>true if removed, false if not already a listener</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getNodeRecord(rice.pastry.direct.DirectNodeHandle)"><!-- --></A><H3>
|
|
getNodeRecord</H3>
|
|
<PRE>
|
|
<A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A> <B>getNodeRecord</B>(<A HREF="../../../rice/pastry/direct/DirectNodeHandle.html" title="class in rice.pastry.direct">DirectNodeHandle</A> handle)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getLivenessProvider()"><!-- --></A><H3>
|
|
getLivenessProvider</H3>
|
|
<PRE>
|
|
<A HREF="../../../org/mpisws/p2p/transport/liveness/LivenessProvider.html" title="interface in org.mpisws.p2p.transport.liveness">LivenessProvider</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>> <B>getLivenessProvider</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getGenericSimulator()"><!-- --></A><H3>
|
|
getGenericSimulator</H3>
|
|
<PRE>
|
|
<A HREF="../../../org/mpisws/p2p/transport/direct/GenericNetworkSimulator.html" title="interface in org.mpisws.p2p.transport.direct">GenericNetworkSimulator</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>> <B>getGenericSimulator</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="registerNode(java.lang.Object,org.mpisws.p2p.transport.direct.DirectTransportLayer,rice.pastry.direct.NodeRecord)"><!-- --></A><A NAME="registerNode(Identifier, org.mpisws.p2p.transport.direct.DirectTransportLayer, rice.pastry.direct.NodeRecord)"><!-- --></A><H3>
|
|
registerNode</H3>
|
|
<PRE>
|
|
void <B>registerNode</B>(<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A> i,
|
|
<A HREF="../../../org/mpisws/p2p/transport/direct/DirectTransportLayer.html" title="class in org.mpisws.p2p.transport.direct">DirectTransportLayer</A><<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>,<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">MessageType</A>> dtl,
|
|
<A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A> nr)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NetworkSimulator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
Rice Pastry API</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../rice/pastry/direct/NetworkSimulatorImpl.html" title="class in rice.pastry.direct"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/pastry/direct/NetworkSimulator.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="NetworkSimulator.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
<i>Copyright © 2001-2005 - Rice Pastry.</i>
|
|
</BODY>
|
|
</HTML>
|