mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 01:26:27 +00:00
527 lines
26 KiB
HTML
527 lines
26 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:35 CET 2009 -->
|
|
<TITLE>
|
|
LookupService (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="LookupService (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/LookupService.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">
|
|
PREV CLASS
|
|
<A HREF="../../../rice/tutorial/lookup/LookupService.NodeLookupQuery.html" title="class in rice.tutorial.lookup"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/tutorial/lookup/LookupService.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="LookupService.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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <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.tutorial.lookup</FONT>
|
|
<BR>
|
|
Class LookupService</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.tutorial.lookup.LookupService</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>LookupService</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
The LookupService provides a way to find out what nodes are responsible for a
|
|
given Id. It does this by routing a request across the ring, doing a
|
|
replicaSet lookup at the destination, and sending the result back. It is
|
|
perhaps the simplest useful application.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>jstewart</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
<A NAME="nested_class_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>Nested Class Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static class</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/tutorial/lookup/LookupService.NodeLookupQuery.html" title="class in rice.tutorial.lookup">LookupService.NodeLookupQuery</A></B></CODE>
|
|
|
|
<BR>
|
|
The query message</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static class</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/tutorial/lookup/LookupService.NodeLookupResponse.html" title="class in rice.tutorial.lookup">LookupService.NodeLookupResponse</A></B></CODE>
|
|
|
|
<BR>
|
|
The response message</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static class</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/tutorial/lookup/LookupService.NodeLookupTimeout.html" title="class in rice.tutorial.lookup">LookupService.NodeLookupTimeout</A></B></CODE>
|
|
|
|
<BR>
|
|
This is a message used internally for implementing timeouts</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static class</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/tutorial/lookup/LookupService.NodeLookupTimeoutException.html" title="class in rice.tutorial.lookup">LookupService.NodeLookupTimeoutException</A></B></CODE>
|
|
|
|
<BR>
|
|
Returned by continuations handed to requestNodeHandles when a request times
|
|
out.</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/tutorial/lookup/LookupService.html#LookupService(rice.p2p.commonapi.Node)">LookupService</A></B>(<A HREF="../../../rice/p2p/commonapi/Node.html" title="interface in rice.p2p.commonapi">Node</A> node)</CODE>
|
|
|
|
<BR>
|
|
Build a LookupService application with the default lookup timeout</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../rice/tutorial/lookup/LookupService.html#LookupService(rice.p2p.commonapi.Node, long)">LookupService</A></B>(<A HREF="../../../rice/p2p/commonapi/Node.html" title="interface in rice.p2p.commonapi">Node</A> node,
|
|
long timeout)</CODE>
|
|
|
|
<BR>
|
|
Build a LookupService application with a specified timeout</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/tutorial/lookup/LookupService.html#deliver(rice.p2p.commonapi.Id, rice.p2p.commonapi.Message)">deliver</A></B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
<A HREF="../../../rice/p2p/commonapi/Message.html" title="interface in rice.p2p.commonapi">Message</A> message)</CODE>
|
|
|
|
<BR>
|
|
This method is called on the application at the destination node
|
|
for the given id.</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/tutorial/lookup/LookupService.html#forward(rice.p2p.commonapi.RouteMessage)">forward</A></B>(<A HREF="../../../rice/p2p/commonapi/RouteMessage.html" title="interface in rice.p2p.commonapi">RouteMessage</A> message)</CODE>
|
|
|
|
<BR>
|
|
This Application always forwards its messages</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/tutorial/lookup/LookupService.html#requestNodeHandle(rice.p2p.commonapi.Id, rice.Continuation)">requestNodeHandle</A></B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>,java.lang.Exception> cont)</CODE>
|
|
|
|
<BR>
|
|
Find the primary replica of a key.</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/tutorial/lookup/LookupService.html#requestNodeHandles(rice.p2p.commonapi.Id, int, rice.Continuation)">requestNodeHandles</A></B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
int num,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandleSet.html" title="interface in rice.p2p.commonapi">NodeHandleSet</A>,java.lang.Exception> cont)</CODE>
|
|
|
|
<BR>
|
|
Requests a replicaSet from a node across the ring.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/tutorial/lookup/LookupService.html#sendMessage(int, rice.p2p.commonapi.Id, int, rice.Continuation, long)">sendMessage</A></B>(int seq,
|
|
<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
int num,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandleSet.html" title="interface in rice.p2p.commonapi">NodeHandleSet</A>,java.lang.Exception> cont,
|
|
long timeout)</CODE>
|
|
|
|
<BR>
|
|
This does the internal processing for requestNodeHandle(s).</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/tutorial/lookup/LookupService.html#sendMessageWithRetries(rice.p2p.commonapi.Id, int, rice.Continuation)">sendMessageWithRetries</A></B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
int num,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandleSet.html" title="interface in rice.p2p.commonapi">NodeHandleSet</A>,java.lang.Exception> cont)</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/tutorial/lookup/LookupService.html#update(rice.p2p.commonapi.NodeHandle, boolean)">update</A></B>(<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> handle,
|
|
boolean joined)</CODE>
|
|
|
|
<BR>
|
|
This method is invoked to inform the application that the given node
|
|
has either joined or left the neighbor set of the local node, as the set
|
|
would be returned by the neighborSet call.</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, toString, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= 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="LookupService(rice.p2p.commonapi.Node, long)"><!-- --></A><H3>
|
|
LookupService</H3>
|
|
<PRE>
|
|
public <B>LookupService</B>(<A HREF="../../../rice/p2p/commonapi/Node.html" title="interface in rice.p2p.commonapi">Node</A> node,
|
|
long timeout)</PRE>
|
|
<DL>
|
|
<DD>Build a LookupService application with a specified timeout
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>node</CODE> - the local node<DD><CODE>timeout</CODE> - query timeout in milliseconds</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="LookupService(rice.p2p.commonapi.Node)"><!-- --></A><H3>
|
|
LookupService</H3>
|
|
<PRE>
|
|
public <B>LookupService</B>(<A HREF="../../../rice/p2p/commonapi/Node.html" title="interface in rice.p2p.commonapi">Node</A> node)</PRE>
|
|
<DL>
|
|
<DD>Build a LookupService application with the default lookup timeout
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>node</CODE> - the local node</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="forward(rice.p2p.commonapi.RouteMessage)"><!-- --></A><H3>
|
|
forward</H3>
|
|
<PRE>
|
|
public boolean <B>forward</B>(<A HREF="../../../rice/p2p/commonapi/RouteMessage.html" title="interface in rice.p2p.commonapi">RouteMessage</A> message)</PRE>
|
|
<DL>
|
|
<DD>This Application always forwards its messages
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/commonapi/Application.html#forward(rice.p2p.commonapi.RouteMessage)">forward</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>message</CODE> - The message being sent, containing an internal message
|
|
along with a destination key and nodeHandle next hop.
|
|
<DT><B>Returns:</B><DD>Whether or not to forward the message further<DT><B>See Also:</B><DD><A HREF="../../../rice/p2p/commonapi/Application.html#forward(rice.p2p.commonapi.RouteMessage)"><CODE>Application.forward(rice.p2p.commonapi.RouteMessage)</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="deliver(rice.p2p.commonapi.Id, rice.p2p.commonapi.Message)"><!-- --></A><H3>
|
|
deliver</H3>
|
|
<PRE>
|
|
public void <B>deliver</B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
<A HREF="../../../rice/p2p/commonapi/Message.html" title="interface in rice.p2p.commonapi">Message</A> message)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/commonapi/Application.html#deliver(rice.p2p.commonapi.Id, rice.p2p.commonapi.Message)">Application</A></CODE></B></DD>
|
|
<DD>This method is called on the application at the destination node
|
|
for the given id.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/commonapi/Application.html#deliver(rice.p2p.commonapi.Id, rice.p2p.commonapi.Message)">deliver</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The destination id of the message<DD><CODE>message</CODE> - The message being sent</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="update(rice.p2p.commonapi.NodeHandle, boolean)"><!-- --></A><H3>
|
|
update</H3>
|
|
<PRE>
|
|
public void <B>update</B>(<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> handle,
|
|
boolean joined)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/commonapi/Application.html#update(rice.p2p.commonapi.NodeHandle, boolean)">Application</A></CODE></B></DD>
|
|
<DD>This method is invoked to inform the application that the given node
|
|
has either joined or left the neighbor set of the local node, as the set
|
|
would be returned by the neighborSet call.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/commonapi/Application.html#update(rice.p2p.commonapi.NodeHandle, boolean)">update</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - The handle that has joined/left<DD><CODE>joined</CODE> - Whether the node has joined or left</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="requestNodeHandles(rice.p2p.commonapi.Id, int, rice.Continuation)"><!-- --></A><H3>
|
|
requestNodeHandles</H3>
|
|
<PRE>
|
|
public void <B>requestNodeHandles</B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
int num,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandleSet.html" title="interface in rice.p2p.commonapi">NodeHandleSet</A>,java.lang.Exception> cont)</PRE>
|
|
<DL>
|
|
<DD>Requests a replicaSet from a node across the ring. This method will return
|
|
via its continuation the set of <tt>num</tt> NodeHandles that are in
|
|
<tt>id</tt>'s replicaSet. Calling requestNodeHandles with a <tt>num</tt>
|
|
of 1 will return the node currently responsible for Id id.
|
|
|
|
If there is a network problem or the Id of interest is not currently owned
|
|
by any node (for example due to churn in the overlay), the continuation
|
|
will receive a NodeLookupTimeoutException.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>id</CODE> - the Id of interest<DD><CODE>num</CODE> - the number of nodes to return<DD><CODE>cont</CODE> - the continuation to return the result to</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="sendMessageWithRetries(rice.p2p.commonapi.Id, int, rice.Continuation)"><!-- --></A><H3>
|
|
sendMessageWithRetries</H3>
|
|
<PRE>
|
|
protected void <B>sendMessageWithRetries</B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
int num,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandleSet.html" title="interface in rice.p2p.commonapi">NodeHandleSet</A>,java.lang.Exception> cont)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="sendMessage(int, rice.p2p.commonapi.Id, int, rice.Continuation, long)"><!-- --></A><H3>
|
|
sendMessage</H3>
|
|
<PRE>
|
|
protected void <B>sendMessage</B>(int seq,
|
|
<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
int num,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandleSet.html" title="interface in rice.p2p.commonapi">NodeHandleSet</A>,java.lang.Exception> cont,
|
|
long timeout)</PRE>
|
|
<DL>
|
|
<DD>This does the internal processing for requestNodeHandle(s). It adds the
|
|
continuation to the pending table, updates the sequence number, schedules
|
|
this timeout, and finally sends the actual message.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>id</CODE> - the Id of interest<DD><CODE>num</CODE> - the number of nodes to return<DD><CODE>cont</CODE> - the continuation to return the result to</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="requestNodeHandle(rice.p2p.commonapi.Id, rice.Continuation)"><!-- --></A><H3>
|
|
requestNodeHandle</H3>
|
|
<PRE>
|
|
public void <B>requestNodeHandle</B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> id,
|
|
<A HREF="../../../rice/Continuation.html" title="interface in rice">Continuation</A><<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>,java.lang.Exception> cont)</PRE>
|
|
<DL>
|
|
<DD>Find the primary replica of a key. This is the node with the Id closest to
|
|
the key in pastry. This method will return via its continuation the
|
|
NodeHandle that is closest to <tt>id</tt>.
|
|
|
|
If there is a network problem or the Id of interest is not currently owned
|
|
by any node (for example due to churn in the overlay), the continuation
|
|
will receive a NodeLookupTimeoutException.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>id</CODE> - the Id of interest<DD><CODE>cont</CODE> - the continuation to return the result to</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/LookupService.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">
|
|
PREV CLASS
|
|
<A HREF="../../../rice/tutorial/lookup/LookupService.NodeLookupQuery.html" title="class in rice.tutorial.lookup"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/tutorial/lookup/LookupService.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="LookupService.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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <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>
|