FreePastry/docs/javadoc/rice/pastry/direct/NetworkSimulator.html

703 lines
34 KiB
HTML
Raw Normal View History

2019-05-13 16:45:05 +04:00
<!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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NetworkSimulator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">
&nbsp;<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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> &nbsp;
&nbsp;<A HREF="NetworkSimulator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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&lt;Identifier,MessageType&gt;</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&lt;Identifier,MessageType&gt;</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>&nbsp;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>&lt;<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>&gt;&nbsp;sl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;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>&nbsp;dpn)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>&nbsp;del,
int&nbsp;delay)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deliver message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates a random node record</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>&nbsp;nh)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the closest Node in proximity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/mpisws/p2p/transport/direct/GenericNetworkSimulator.html" title="interface in org.mpisws.p2p.transport.direct">GenericNetworkSimulator</A>&lt;<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>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getGenericSimulator()">getGenericSimulator</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/mpisws/p2p/transport/liveness/LivenessProvider.html" title="interface in org.mpisws.p2p.transport.liveness">LivenessProvider</A>&lt;<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#getLivenessProvider()">getLivenessProvider</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>&nbsp;handle)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;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>&nbsp;nh)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;a,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;m,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;from,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;to)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;m,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;from,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;to,
int&nbsp;delay)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;a,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines rtt between two nodes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;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>&nbsp;i,
<A HREF="../../../org/mpisws/p2p/transport/direct/DirectTransportLayer.html" title="class in org.mpisws.p2p.transport.direct">DirectTransportLayer</A>&lt;<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>&gt;&nbsp;dtl,
<A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A>&nbsp;nr)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;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>&nbsp;node)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&lt;<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>&gt;&nbsp;sl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#setFullSpeed()">setFullSpeed</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unlimited maxSpeed</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#setMaxSpeed(float)">setMaxSpeed</A></B>(float&nbsp;rate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;tr)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#start()">start</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/direct/NetworkSimulator.html#stop()">stop</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<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>&nbsp;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>&nbsp;a,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;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>&nbsp;a,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;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>&nbsp;del,
int&nbsp;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&nbsp;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>&nbsp;m,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;from,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;to,
int&nbsp;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>&nbsp;m,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;from,
<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&nbsp;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>&lt;<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>&gt;&nbsp;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>&lt;<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>&gt;&nbsp;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>&nbsp;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>&lt;<A HREF="../../../rice/pastry/direct/NetworkSimulator.html" title="type parameter in NetworkSimulator">Identifier</A>&gt; <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>&lt;<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>&gt; <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>&nbsp;i,
<A HREF="../../../org/mpisws/p2p/transport/direct/DirectTransportLayer.html" title="class in org.mpisws.p2p.transport.direct">DirectTransportLayer</A>&lt;<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>&gt;&nbsp;dtl,
<A HREF="../../../rice/pastry/direct/NodeRecord.html" title="interface in rice.pastry.direct">NodeRecord</A>&nbsp;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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NetworkSimulator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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">
&nbsp;<A HREF="../../../rice/pastry/direct/GenericSimulatorListener.html" title="interface in rice.pastry.direct"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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> &nbsp;
&nbsp;<A HREF="NetworkSimulator.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2005 - Rice Pastry.</i>
</BODY>
</HTML>