mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 01:26:27 +00:00
545 lines
30 KiB
HTML
545 lines
30 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:08 CET 2009 -->
|
|
<TITLE>
|
|
ScribePolicy.DefaultScribePolicy (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="ScribePolicy.DefaultScribePolicy (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/ScribePolicy.DefaultScribePolicy.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/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../rice/p2p/scribe/ScribePolicy.LimitedScribePolicy.html" title="class in rice.p2p.scribe"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/p2p/scribe/ScribePolicy.DefaultScribePolicy.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="ScribePolicy.DefaultScribePolicy.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.p2p.scribe</FONT>
|
|
<BR>
|
|
Class ScribePolicy.DefaultScribePolicy</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.p2p.scribe.ScribePolicy.DefaultScribePolicy</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></DD>
|
|
</DL>
|
|
<DL>
|
|
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../rice/p2p/scribe/ScribePolicy.LimitedScribePolicy.html" title="class in rice.p2p.scribe">ScribePolicy.LimitedScribePolicy</A>, <A HREF="../../../rice/p2p/scribe/testing/ScribeRegrTest.TestScribePolicy.html" title="class in rice.p2p.scribe.testing">ScribeRegrTest.TestScribePolicy</A>, <A HREF="../../../rice/p2p/splitstream/SplitStreamScribePolicy.html" title="class in rice.p2p.splitstream">SplitStreamScribePolicy</A></DD>
|
|
</DL>
|
|
<DL>
|
|
<DT><B>Enclosing interface:</B><DD><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public static class <B>ScribePolicy.DefaultScribePolicy</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
The default policy for Scribe, which always allows new children to join and adds children in
|
|
the order in which they are provided, implicitly providing a depth-first search.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Version:</B></DT>
|
|
<DD>$Id: ScribePolicy.java 4098 2008-02-13 09:36:33Z jeffh $</DD>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>amislove</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>
|
|
</TABLE>
|
|
<A NAME="nested_classes_inherited_from_class_rice.p2p.scribe.ScribePolicy"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Nested classes/interfaces inherited from interface rice.p2p.scribe.<A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.DefaultScribePolicy.html" title="class in rice.p2p.scribe">ScribePolicy.DefaultScribePolicy</A>, <A HREF="../../../rice/p2p/scribe/ScribePolicy.LimitedScribePolicy.html" title="class in rice.p2p.scribe">ScribePolicy.LimitedScribePolicy</A></CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- =========== 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>protected <A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#environment">environment</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/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#ScribePolicy.DefaultScribePolicy(rice.environment.Environment)">ScribePolicy.DefaultScribePolicy</A></B>(<A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> env)</CODE>
|
|
|
|
<BR>
|
|
</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> java.util.List<<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#allowSubscribe(rice.p2p.scribe.Scribe, rice.p2p.commonapi.NodeHandle, java.util.List, rice.p2p.scribe.ScribeContent)">allowSubscribe</A></B>(<A HREF="../../../rice/p2p/scribe/Scribe.html" title="interface in rice.p2p.scribe">Scribe</A> scribe,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> source,
|
|
java.util.List<<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>> topics,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A> content)</CODE>
|
|
|
|
<BR>
|
|
If you don't override the deprecated allowSubscribe(), This method always return true;</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/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#allowSubscribe(rice.p2p.scribe.messaging.SubscribeMessage, rice.p2p.scribe.ScribeClient[], rice.p2p.commonapi.NodeHandle[])">allowSubscribe</A></B>(<A HREF="../../../rice/p2p/scribe/messaging/SubscribeMessage.html" title="class in rice.p2p.scribe.messaging">SubscribeMessage</A> message,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A>[] clients,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>[] children)</CODE>
|
|
|
|
<BR>
|
|
This method should be deprecated, but is here for reverse compatibility.</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/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#childAdded(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childAdded</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A> topic,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> child)</CODE>
|
|
|
|
<BR>
|
|
Informs this policy that a child was added to a topic - the topic is free to ignore this
|
|
upcall if it doesn't care.</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/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#childRemoved(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childRemoved</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A> topic,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> child)</CODE>
|
|
|
|
<BR>
|
|
Informs this policy that a child was removed from a topic - the topic is free to ignore this
|
|
upcall if it doesn't care.</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/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#directAnycast(rice.p2p.scribe.messaging.AnycastMessage, rice.p2p.commonapi.NodeHandle, java.util.Collection)">directAnycast</A></B>(<A HREF="../../../rice/p2p/scribe/messaging/AnycastMessage.html" title="class in rice.p2p.scribe.messaging">AnycastMessage</A> message,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> parent,
|
|
java.util.Collection<<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>> theChildren)</CODE>
|
|
|
|
<BR>
|
|
Simply adds the parent and children in order, which implements a depth-first-search.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#divideContent(java.util.List, rice.p2p.scribe.ScribeContent)">divideContent</A></B>(java.util.List<<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>> theTopics,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A> content)</CODE>
|
|
|
|
<BR>
|
|
This method is called when the ScribeImpl splits a SubscribeMessage into multiple parts.</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/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#intermediateNode(rice.p2p.scribe.messaging.ScribeMessage)">intermediateNode</A></B>(<A HREF="../../../rice/p2p/scribe/messaging/ScribeMessage.html" title="class in rice.p2p.scribe.messaging">ScribeMessage</A> message)</CODE>
|
|
|
|
<BR>
|
|
This is invoked whenever this message arrives on any overlay node, this gives the ScribeClient's power
|
|
to tap into some datastructures they might wanna edit</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/p2p/scribe/ScribePolicy.DefaultScribePolicy.html#recvAnycastFail(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle, rice.p2p.scribe.ScribeContent)">recvAnycastFail</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A> topic,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> failedAtNode,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A> content)</CODE>
|
|
|
|
<BR>
|
|
This notifies us when we receive a failure for a anycast</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>
|
|
|
|
<!-- ============ 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="environment"><!-- --></A><H3>
|
|
environment</H3>
|
|
<PRE>
|
|
protected <A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> <B>environment</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</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="ScribePolicy.DefaultScribePolicy(rice.environment.Environment)"><!-- --></A><H3>
|
|
ScribePolicy.DefaultScribePolicy</H3>
|
|
<PRE>
|
|
public <B>ScribePolicy.DefaultScribePolicy</B>(<A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> env)</PRE>
|
|
<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="allowSubscribe(rice.p2p.scribe.Scribe, rice.p2p.commonapi.NodeHandle, java.util.List, rice.p2p.scribe.ScribeContent)"><!-- --></A><H3>
|
|
allowSubscribe</H3>
|
|
<PRE>
|
|
public java.util.List<<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>> <B>allowSubscribe</B>(<A HREF="../../../rice/p2p/scribe/Scribe.html" title="interface in rice.p2p.scribe">Scribe</A> scribe,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> source,
|
|
java.util.List<<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>> topics,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A> content)</PRE>
|
|
<DL>
|
|
<DD>If you don't override the deprecated allowSubscribe(), This method always return true;
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#allowSubscribe(rice.p2p.scribe.Scribe, rice.p2p.commonapi.NodeHandle, java.util.List, rice.p2p.scribe.ScribeContent)">allowSubscribe</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>message</CODE> - The subscribe message in question<DD><CODE>children</CODE> - The list of children who are currently subscribed<DD><CODE>clients</CODE> - The list of clients are are currently subscribed
|
|
<DT><B>Returns:</B><DD>the topics to accept</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="allowSubscribe(rice.p2p.scribe.messaging.SubscribeMessage, rice.p2p.scribe.ScribeClient[], rice.p2p.commonapi.NodeHandle[])"><!-- --></A><H3>
|
|
allowSubscribe</H3>
|
|
<PRE>
|
|
public boolean <B>allowSubscribe</B>(<A HREF="../../../rice/p2p/scribe/messaging/SubscribeMessage.html" title="class in rice.p2p.scribe.messaging">SubscribeMessage</A> message,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A>[] clients,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>[] children)</PRE>
|
|
<DL>
|
|
<DD>This method should be deprecated, but is here for reverse compatibility. We changed the
|
|
allowSubscribe() method, but classes that extend DefaultScribePolicy object could make a mistake
|
|
and not override the new one.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>message</CODE> - <DD><CODE>clients</CODE> - <DD><CODE>children</CODE> -
|
|
<DT><B>Returns:</B><DD></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="directAnycast(rice.p2p.scribe.messaging.AnycastMessage, rice.p2p.commonapi.NodeHandle, java.util.Collection)"><!-- --></A><H3>
|
|
directAnycast</H3>
|
|
<PRE>
|
|
public void <B>directAnycast</B>(<A HREF="../../../rice/p2p/scribe/messaging/AnycastMessage.html" title="class in rice.p2p.scribe.messaging">AnycastMessage</A> message,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> parent,
|
|
java.util.Collection<<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>> theChildren)</PRE>
|
|
<DL>
|
|
<DD>Simply adds the parent and children in order, which implements a depth-first-search.
|
|
|
|
randomly picks a child
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#directAnycast(rice.p2p.scribe.messaging.AnycastMessage, rice.p2p.commonapi.NodeHandle, java.util.Collection)">directAnycast</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>message</CODE> - The anycast message in question<DD><CODE>parent</CODE> - Our current parent for this message's topic<DD><CODE>children</CODE> - Our current children for this message's topic</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="childAdded(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)"><!-- --></A><H3>
|
|
childAdded</H3>
|
|
<PRE>
|
|
public void <B>childAdded</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A> topic,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> child)</PRE>
|
|
<DL>
|
|
<DD>Informs this policy that a child was added to a topic - the topic is free to ignore this
|
|
upcall if it doesn't care.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#childAdded(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childAdded</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - The topic to unsubscribe from<DD><CODE>child</CODE> - The child that was added</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="childRemoved(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)"><!-- --></A><H3>
|
|
childRemoved</H3>
|
|
<PRE>
|
|
public void <B>childRemoved</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A> topic,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> child)</PRE>
|
|
<DL>
|
|
<DD>Informs this policy that a child was removed from a topic - the topic is free to ignore this
|
|
upcall if it doesn't care.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#childRemoved(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childRemoved</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - The topic to unsubscribe from<DD><CODE>child</CODE> - The child that was removed</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="intermediateNode(rice.p2p.scribe.messaging.ScribeMessage)"><!-- --></A><H3>
|
|
intermediateNode</H3>
|
|
<PRE>
|
|
public void <B>intermediateNode</B>(<A HREF="../../../rice/p2p/scribe/messaging/ScribeMessage.html" title="class in rice.p2p.scribe.messaging">ScribeMessage</A> message)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#intermediateNode(rice.p2p.scribe.messaging.ScribeMessage)">ScribePolicy</A></CODE></B></DD>
|
|
<DD>This is invoked whenever this message arrives on any overlay node, this gives the ScribeClient's power
|
|
to tap into some datastructures they might wanna edit
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#intermediateNode(rice.p2p.scribe.messaging.ScribeMessage)">intermediateNode</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="recvAnycastFail(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle, rice.p2p.scribe.ScribeContent)"><!-- --></A><H3>
|
|
recvAnycastFail</H3>
|
|
<PRE>
|
|
public void <B>recvAnycastFail</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A> topic,
|
|
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> failedAtNode,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A> content)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#recvAnycastFail(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle, rice.p2p.scribe.ScribeContent)">ScribePolicy</A></CODE></B></DD>
|
|
<DD>This notifies us when we receive a failure for a anycast
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#recvAnycastFail(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle, rice.p2p.scribe.ScribeContent)">recvAnycastFail</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="divideContent(java.util.List, rice.p2p.scribe.ScribeContent)"><!-- --></A><H3>
|
|
divideContent</H3>
|
|
<PRE>
|
|
public <A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A> <B>divideContent</B>(java.util.List<<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>> theTopics,
|
|
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A> content)</PRE>
|
|
<DL>
|
|
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#divideContent(java.util.List, rice.p2p.scribe.ScribeContent)">ScribePolicy</A></CODE></B></DD>
|
|
<DD>This method is called when the ScribeImpl splits a SubscribeMessage into multiple parts.
|
|
|
|
If you modify the content, you must make a copy, as the same content will be passed in for the other
|
|
divisions of the SubscribeMessage. ScribeContent's are not naturally copyable, so Scribe cannot
|
|
make a copy apriori.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html#divideContent(java.util.List, rice.p2p.scribe.ScribeContent)">divideContent</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe">ScribePolicy</A></CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>theTopics</CODE> - topics going to a particular location<DD><CODE>content</CODE> - the content that may need to be divided
|
|
<DT><B>Returns:</B><DD>the content if not changed, a new ScribeContent if changed</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/ScribePolicy.DefaultScribePolicy.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/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../rice/p2p/scribe/ScribePolicy.LimitedScribePolicy.html" title="class in rice.p2p.scribe"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/p2p/scribe/ScribePolicy.DefaultScribePolicy.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="ScribePolicy.DefaultScribePolicy.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>
|