mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 09:36:27 +00:00
1100 lines
41 KiB
HTML
1100 lines
41 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:06 CET 2009 -->
|
||
|
<TITLE>
|
||
|
RoutingTable (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="RoutingTable (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/RoutingTable.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/routing/RouteSetProtocol.html" title="interface in rice.pastry.routing"><B>PREV CLASS</B></A>
|
||
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing"><B>NEXT CLASS</B></A></FONT></TD>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../index.html?rice/pastry/routing/RoutingTable.html" target="_top"><B>FRAMES</B></A>
|
||
|
<A HREF="RoutingTable.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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.routing</FONT>
|
||
|
<BR>
|
||
|
Class RoutingTable</H2>
|
||
|
<PRE>
|
||
|
java.lang.Object
|
||
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.util.Observable
|
||
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.pastry.routing.RoutingTable</B>
|
||
|
</PRE>
|
||
|
<DL>
|
||
|
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../rice/pastry/NodeSetEventSource.html" title="interface in rice.pastry">NodeSetEventSource</A></DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
<DL>
|
||
|
<DT><PRE>public class <B>RoutingTable</B><DT>extends java.util.Observable<DT>implements <A HREF="../../../rice/pastry/NodeSetEventSource.html" title="interface in rice.pastry">NodeSetEventSource</A></DL>
|
||
|
</PRE>
|
||
|
|
||
|
<P>
|
||
|
The Pastry routing table.
|
||
|
<P>
|
||
|
The size of this table is determined by two constants:
|
||
|
<P>
|
||
|
<UL>
|
||
|
<LI><CODE>nodeIdBitLength</CODE>which
|
||
|
determines the number of bits in a node id (which we call <EM>n</EM>).
|
||
|
<LI><A HREF="../../../rice/pastry/routing/RoutingTable.html#idBaseBitLength"><CODE>idBaseBitLength</CODE></A>which is the base
|
||
|
that table is stored in (which we call <EM>b</EM>).
|
||
|
</UL>
|
||
|
<P>
|
||
|
We write out node ids as numbers in base <EM>2 <SUP>b </SUP></EM>. They
|
||
|
will have length <EM>D = ceiling(log <SUB>2 <SUP>b </SUP> </SUB> 2 <SUP>n
|
||
|
</SUP>)</EM>. The table is stored from <EM>0...(D-1)</EM> by <EM>0...(2
|
||
|
<SUP>b </SUP>- 1)</EM>. The table stores a set of node handles at each
|
||
|
entry. At address <EM>[index][digit]</EM>, we store the set of handles
|
||
|
were the most significant (numerically) difference from the node id that the
|
||
|
table routes for at the <EM>index</EM> th digit and the differing digit is
|
||
|
<EM>digit</EM>. An <EM>index</EM> of <EM>0</EM> is the least
|
||
|
significant digit.
|
||
|
<P>
|
||
|
|
||
|
<P>
|
||
|
<DL>
|
||
|
<DT><B>Version:</B></DT>
|
||
|
<DD>$Id: RoutingTable.java 4654 2009-01-08 16:33:07Z jeffh $</DD>
|
||
|
<DT><B>Author:</B></DT>
|
||
|
<DD>Andrew Ladd, Peter Druschel</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<P>
|
||
|
<!-- =========== FIELD SUMMARY =========== -->
|
||
|
|
||
|
<A NAME="field_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>Field Summary</B></FONT></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> byte</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#idBaseBitLength">idBaseBitLength</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
The routing calculations will occur in base <EM>2 <SUP>idBaseBitLength
|
||
|
</SUP></EM></TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#myNodeHandle">myNodeHandle</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>protected <A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#pn">pn</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#TEST_FAIL_EXISTING_ARE_BETTER">TEST_FAIL_EXISTING_ARE_BETTER</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#TEST_FAIL_NO_PREFIX_MATCH">TEST_FAIL_NO_PREFIX_MATCH</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#TEST_SUCCESS_AVAILABLE_SPACE">TEST_SUCCESS_AVAILABLE_SPACE</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#TEST_SUCCESS_BETTER_PROXIMITY">TEST_SUCCESS_BETTER_PROXIMITY</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#TEST_SUCCESS_ENTRY_WAS_DEAD">TEST_SUCCESS_ENTRY_WAS_DEAD</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#TEST_SUCCESS_NO_ENTRIES">TEST_SUCCESS_NO_ENTRIES</A></B></CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||
|
|
||
|
<A NAME="constructor_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>Constructor Summary</B></FONT></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#RoutingTable(rice.pastry.NodeHandle, int, byte, rice.pastry.PastryNode)">RoutingTable</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> me,
|
||
|
int max,
|
||
|
byte base,
|
||
|
<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Constructor.</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<!-- ========== 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> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#addNodeSetListener(rice.pastry.NodeSetListener)">addNodeSetListener</A></B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</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/routing/RoutingTable.html#addObserver(java.util.Observer)">addObserver</A></B>(java.util.Observer o)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
<B>Deprecated.</B> <I>use addNodeSetListener</I></TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeSet.html" title="class in rice.pastry">NodeSet</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#alternateRoutes(rice.pastry.Id, int)">alternateRoutes</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
||
|
int max)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Determines a set of alternate hops towards a given key.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.util.Iterator<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#alternateRoutesIterator(rice.pastry.Id)">alternateRoutesIterator</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
More efficient implementation, but less accurate, doesn't include lower levels of rt.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.util.List<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#asList()">asList</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Does not return self</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> byte</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#baseBitLength()">baseBitLength</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
return the bit length of the base</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#bestAlternateRoute(rice.pastry.Id)">bestAlternateRoute</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Determines an alternate hop numerically closer to the key than the one we
|
||
|
are at.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#bestAlternateRoute(int, rice.pastry.Id)">bestAlternateRoute</A></B>(int minLiveness,
|
||
|
<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Determines an alternate hop numerically closer to the key than the one we
|
||
|
are at.</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/routing/RoutingTable.html#deleteObserver(java.util.Observer)">deleteObserver</A></B>(java.util.Observer o)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
<B>Deprecated.</B> <I>use deleteNodeSetListener</I></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/routing/RoutingTable.html#destroy()">destroy</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Unregisters as an observer on all nodehandles.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#get(rice.pastry.Id)">get</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> nid)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Gets the node handle associated with a given id.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/routing/RouteSet.html" title="class in rice.pastry.routing">RouteSet</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#getBestEntry(rice.pastry.Id)">getBestEntry</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Gets the set of handles that match at least one more digit of the key than
|
||
|
the local Id.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/routing/RouteSet.html" title="class in rice.pastry.routing">RouteSet</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#getRouteSet(int, int)">getRouteSet</A></B>(int index,
|
||
|
int digit)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Gets the set of handles at a particular entry in the table.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/routing/RouteSet.html" title="class in rice.pastry.routing">RouteSet</A>[]</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#getRow(int)">getRow</A></B>(int i)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Get a row from the routing table.</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/routing/RoutingTable.html#nodeSetUpdate(java.lang.Object, rice.pastry.NodeHandle, boolean)">nodeSetUpdate</A></B>(java.lang.Object o,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle,
|
||
|
boolean added)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Is called by the Observer pattern whenever a RouteSet in this table has
|
||
|
changed.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#numColumns()">numColumns</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
return ths number of columns in the routing table</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#numEntries()">numEntries</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> short</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#numRows()">numRows</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
return the number of rows in the routing table</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#numUniqueEntries()">numUniqueEntries</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#printSelf()">printSelf</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/routing/RoutingTable.html#put(rice.pastry.NodeHandle)">put</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Puts a handle into the routing table.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#remove(rice.pastry.NodeHandle)">remove</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Removes a node id from the table.</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/routing/RoutingTable.html#removeNodeSetListener(rice.pastry.NodeSetListener)">removeNodeSetListener</A></B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#test(rice.pastry.NodeHandle)">test</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/routing/RoutingTable.html#toString()">toString</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
produces a String representation of the routing table, showing the number
|
||
|
of node handles in each entry</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<A NAME="methods_inherited_from_class_java.util.Observable"><!-- --></A>
|
||
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||
|
<TH ALIGN="left"><B>Methods inherited from class java.util.Observable</B></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE>clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged</CODE></TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<P>
|
||
|
|
||
|
<!-- ============ FIELD DETAIL =========== -->
|
||
|
|
||
|
<A NAME="field_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>Field Detail</B></FONT></TH>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<A NAME="idBaseBitLength"><!-- --></A><H3>
|
||
|
idBaseBitLength</H3>
|
||
|
<PRE>
|
||
|
public byte <B>idBaseBitLength</B></PRE>
|
||
|
<DL>
|
||
|
<DD>The routing calculations will occur in base <EM>2 <SUP>idBaseBitLength
|
||
|
</SUP></EM>
|
||
|
<P>
|
||
|
<DL>
|
||
|
</DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="myNodeHandle"><!-- --></A><H3>
|
||
|
myNodeHandle</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>myNodeHandle</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
</DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="pn"><!-- --></A><H3>
|
||
|
pn</H3>
|
||
|
<PRE>
|
||
|
protected <A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> <B>pn</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
</DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="TEST_FAIL_NO_PREFIX_MATCH"><!-- --></A><H3>
|
||
|
TEST_FAIL_NO_PREFIX_MATCH</H3>
|
||
|
<PRE>
|
||
|
public static final int <B>TEST_FAIL_NO_PREFIX_MATCH</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#rice.pastry.routing.RoutingTable.TEST_FAIL_NO_PREFIX_MATCH">Constant Field Values</A></DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="TEST_FAIL_EXISTING_ARE_BETTER"><!-- --></A><H3>
|
||
|
TEST_FAIL_EXISTING_ARE_BETTER</H3>
|
||
|
<PRE>
|
||
|
public static final int <B>TEST_FAIL_EXISTING_ARE_BETTER</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#rice.pastry.routing.RoutingTable.TEST_FAIL_EXISTING_ARE_BETTER">Constant Field Values</A></DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="TEST_SUCCESS_BETTER_PROXIMITY"><!-- --></A><H3>
|
||
|
TEST_SUCCESS_BETTER_PROXIMITY</H3>
|
||
|
<PRE>
|
||
|
public static final int <B>TEST_SUCCESS_BETTER_PROXIMITY</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#rice.pastry.routing.RoutingTable.TEST_SUCCESS_BETTER_PROXIMITY">Constant Field Values</A></DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="TEST_SUCCESS_ENTRY_WAS_DEAD"><!-- --></A><H3>
|
||
|
TEST_SUCCESS_ENTRY_WAS_DEAD</H3>
|
||
|
<PRE>
|
||
|
public static final int <B>TEST_SUCCESS_ENTRY_WAS_DEAD</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#rice.pastry.routing.RoutingTable.TEST_SUCCESS_ENTRY_WAS_DEAD">Constant Field Values</A></DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="TEST_SUCCESS_AVAILABLE_SPACE"><!-- --></A><H3>
|
||
|
TEST_SUCCESS_AVAILABLE_SPACE</H3>
|
||
|
<PRE>
|
||
|
public static final int <B>TEST_SUCCESS_AVAILABLE_SPACE</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#rice.pastry.routing.RoutingTable.TEST_SUCCESS_AVAILABLE_SPACE">Constant Field Values</A></DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="TEST_SUCCESS_NO_ENTRIES"><!-- --></A><H3>
|
||
|
TEST_SUCCESS_NO_ENTRIES</H3>
|
||
|
<PRE>
|
||
|
public static final int <B>TEST_SUCCESS_NO_ENTRIES</B></PRE>
|
||
|
<DL>
|
||
|
<DL>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#rice.pastry.routing.RoutingTable.TEST_SUCCESS_NO_ENTRIES">Constant Field Values</A></DL>
|
||
|
</DL>
|
||
|
|
||
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||
|
|
||
|
<A NAME="constructor_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>Constructor Detail</B></FONT></TH>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<A NAME="RoutingTable(rice.pastry.NodeHandle, int, byte, rice.pastry.PastryNode)"><!-- --></A><H3>
|
||
|
RoutingTable</H3>
|
||
|
<PRE>
|
||
|
public <B>RoutingTable</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> me,
|
||
|
int max,
|
||
|
byte base,
|
||
|
<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn)</PRE>
|
||
|
<DL>
|
||
|
<DD>Constructor.
|
||
|
<P>
|
||
|
<DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>me</CODE> - the node id for this routing table.<DD><CODE>max</CODE> - the maximum number of entries at each table slot.</DL>
|
||
|
</DL>
|
||
|
|
||
|
<!-- ============ 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="numColumns()"><!-- --></A><H3>
|
||
|
numColumns</H3>
|
||
|
<PRE>
|
||
|
public int <B>numColumns</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>return ths number of columns in the routing table
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>number of columns</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="numRows()"><!-- --></A><H3>
|
||
|
numRows</H3>
|
||
|
<PRE>
|
||
|
public short <B>numRows</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>return the number of rows in the routing table
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>number of rows</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="baseBitLength()"><!-- --></A><H3>
|
||
|
baseBitLength</H3>
|
||
|
<PRE>
|
||
|
public byte <B>baseBitLength</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>return the bit length of the base
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>baseBitLength</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="bestAlternateRoute(rice.pastry.Id)"><!-- --></A><H3>
|
||
|
bestAlternateRoute</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>bestAlternateRoute</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</PRE>
|
||
|
<DL>
|
||
|
<DD>Determines an alternate hop numerically closer to the key than the one we
|
||
|
are at. This assumes that bestEntry did not produce a live nodeHandle that
|
||
|
matches the next digit of the key.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
||
|
<DT><B>Returns:</B><DD>a nodeHandle of a numerically closer node, relative to the key</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="bestAlternateRoute(int, rice.pastry.Id)"><!-- --></A><H3>
|
||
|
bestAlternateRoute</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>bestAlternateRoute</B>(int minLiveness,
|
||
|
<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</PRE>
|
||
|
<DL>
|
||
|
<DD>Determines an alternate hop numerically closer to the key than the one we
|
||
|
are at. This assumes that bestEntry did not produce a live nodeHandle that
|
||
|
matches the next digit of the key.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
||
|
<DT><B>Returns:</B><DD>a nodeHandle of a numerically closer node, relative to the key</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="alternateRoutes(rice.pastry.Id, int)"><!-- --></A><H3>
|
||
|
alternateRoutes</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeSet.html" title="class in rice.pastry">NodeSet</A> <B>alternateRoutes</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
||
|
int max)</PRE>
|
||
|
<DL>
|
||
|
<DD>Determines a set of alternate hops towards a given key.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key<DD><CODE>max</CODE> - the maximal number of alternate hops requested
|
||
|
<DT><B>Returns:</B><DD>a set of nodehandles, or null if no alternate hops exist</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="alternateRoutesIterator(rice.pastry.Id)"><!-- --></A><H3>
|
||
|
alternateRoutesIterator</H3>
|
||
|
<PRE>
|
||
|
public java.util.Iterator<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>> <B>alternateRoutesIterator</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</PRE>
|
||
|
<DL>
|
||
|
<DD>More efficient implementation, but less accurate, doesn't include lower levels of rt.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> -
|
||
|
<DT><B>Returns:</B><DD></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="getRouteSet(int, int)"><!-- --></A><H3>
|
||
|
getRouteSet</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/routing/RouteSet.html" title="class in rice.pastry.routing">RouteSet</A> <B>getRouteSet</B>(int index,
|
||
|
int digit)</PRE>
|
||
|
<DL>
|
||
|
<DD>Gets the set of handles at a particular entry in the table.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the digit in base <EM>2 <SUP>idBaseBitLength
|
||
|
</SUP></EM>.<EM>0</EM> is the least significant.<DD><CODE>digit</CODE> - ranges from <EM>0... 2 <SUP>idBaseBitLength - 1 </SUP></EM>.
|
||
|
Selects which digit to use.
|
||
|
<DT><B>Returns:</B><DD>a read-only set of possible handles located at that position in the
|
||
|
routing table, or null if none are known</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="getBestEntry(rice.pastry.Id)"><!-- --></A><H3>
|
||
|
getBestEntry</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/routing/RouteSet.html" title="class in rice.pastry.routing">RouteSet</A> <B>getBestEntry</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</PRE>
|
||
|
<DL>
|
||
|
<DD>Gets the set of handles that match at least one more digit of the key than
|
||
|
the local Id.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
||
|
<DT><B>Returns:</B><DD>a read-only set of possible handles, or null if none are known</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="put(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
put</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>put</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</PRE>
|
||
|
<DL>
|
||
|
<DD>Puts a handle into the routing table.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - the handle to put.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="test(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
test</H3>
|
||
|
<PRE>
|
||
|
public int <B>test</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="get(rice.pastry.Id)"><!-- --></A><H3>
|
||
|
get</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>get</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> nid)</PRE>
|
||
|
<DL>
|
||
|
<DD>Gets the node handle associated with a given id.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> - a node id
|
||
|
<DT><B>Returns:</B><DD>the handle associated with that id, or null if none is known.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="getRow(int)"><!-- --></A><H3>
|
||
|
getRow</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/routing/RouteSet.html" title="class in rice.pastry.routing">RouteSet</A>[] <B>getRow</B>(int i)</PRE>
|
||
|
<DL>
|
||
|
<DD>Get a row from the routing table.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>i</CODE> - which row
|
||
|
<DT><B>Returns:</B><DD>an array which is the ith row.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="remove(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
remove</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>remove</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)</PRE>
|
||
|
<DL>
|
||
|
<DD>Removes a node id from the table.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> - the node id to remove.
|
||
|
<DT><B>Returns:</B><DD>the handle that was removed, or null if it did not exist.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="nodeSetUpdate(java.lang.Object, rice.pastry.NodeHandle, boolean)"><!-- --></A><H3>
|
||
|
nodeSetUpdate</H3>
|
||
|
<PRE>
|
||
|
public void <B>nodeSetUpdate</B>(java.lang.Object o,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle,
|
||
|
boolean added)</PRE>
|
||
|
<DL>
|
||
|
<DD>Is called by the Observer pattern whenever a RouteSet in this table has
|
||
|
changed.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the RouteSet<DD><CODE>arg</CODE> - the event</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="toString()"><!-- --></A><H3>
|
||
|
toString</H3>
|
||
|
<PRE>
|
||
|
public java.lang.String <B>toString</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>produces a String representation of the routing table, showing the number
|
||
|
of node handles in each entry
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="printSelf()"><!-- --></A><H3>
|
||
|
printSelf</H3>
|
||
|
<PRE>
|
||
|
public java.lang.String <B>printSelf</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="numEntries()"><!-- --></A><H3>
|
||
|
numEntries</H3>
|
||
|
<PRE>
|
||
|
public int <B>numEntries</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="numUniqueEntries()"><!-- --></A><H3>
|
||
|
numUniqueEntries</H3>
|
||
|
<PRE>
|
||
|
public int <B>numUniqueEntries</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="addObserver(java.util.Observer)"><!-- --></A><H3>
|
||
|
addObserver</H3>
|
||
|
<PRE>
|
||
|
public void <B>addObserver</B>(java.util.Observer o)</PRE>
|
||
|
<DL>
|
||
|
<DD><B>Deprecated.</B> <I>use addNodeSetListener</I>
|
||
|
<P>
|
||
|
<DD>Generates too many objects to use this interface
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
<DT><B>Overrides:</B><DD><CODE>addObserver</CODE> in class <CODE>java.util.Observable</CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="deleteObserver(java.util.Observer)"><!-- --></A><H3>
|
||
|
deleteObserver</H3>
|
||
|
<PRE>
|
||
|
public void <B>deleteObserver</B>(java.util.Observer o)</PRE>
|
||
|
<DL>
|
||
|
<DD><B>Deprecated.</B> <I>use deleteNodeSetListener</I>
|
||
|
<P>
|
||
|
<DD>Generates too many objects to use this interface
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
<DT><B>Overrides:</B><DD><CODE>deleteObserver</CODE> in class <CODE>java.util.Observable</CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="addNodeSetListener(rice.pastry.NodeSetListener)"><!-- --></A><H3>
|
||
|
addNodeSetListener</H3>
|
||
|
<PRE>
|
||
|
public void <B>addNodeSetListener</B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/pastry/NodeSetEventSource.html#addNodeSetListener(rice.pastry.NodeSetListener)">addNodeSetListener</A></CODE> in interface <CODE><A HREF="../../../rice/pastry/NodeSetEventSource.html" title="interface in rice.pastry">NodeSetEventSource</A></CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="removeNodeSetListener(rice.pastry.NodeSetListener)"><!-- --></A><H3>
|
||
|
removeNodeSetListener</H3>
|
||
|
<PRE>
|
||
|
public void <B>removeNodeSetListener</B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/pastry/NodeSetEventSource.html#removeNodeSetListener(rice.pastry.NodeSetListener)">removeNodeSetListener</A></CODE> in interface <CODE><A HREF="../../../rice/pastry/NodeSetEventSource.html" title="interface in rice.pastry">NodeSetEventSource</A></CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="asList()"><!-- --></A><H3>
|
||
|
asList</H3>
|
||
|
<PRE>
|
||
|
public java.util.List<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>> <B>asList</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Does not return self
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>list of NodeHandle</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="destroy()"><!-- --></A><H3>
|
||
|
destroy</H3>
|
||
|
<PRE>
|
||
|
public void <B>destroy</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Unregisters as an observer on all nodehandles.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<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/RoutingTable.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/routing/RouteSetProtocol.html" title="interface in rice.pastry.routing"><B>PREV CLASS</B></A>
|
||
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing"><B>NEXT CLASS</B></A></FONT></TD>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../index.html?rice/pastry/routing/RoutingTable.html" target="_top"><B>FRAMES</B></A>
|
||
|
<A HREF="RoutingTable.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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>
|