FreePastry/docs/javadoc/rice/p2p/scribe/ScribePolicy.DefaultScribePolicy.html
ChronosX88 aaa73fe8b3 Pew
2019-05-13 16:45:05 +04:00

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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ScribePolicy.DefaultScribePolicy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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> &nbsp;
&nbsp;<A HREF="ScribePolicy.DefaultScribePolicy.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
rice.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>
&nbsp;<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>
&nbsp;
<!-- =========== 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 &nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== 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>&nbsp;env)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&gt;</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>&nbsp;scribe,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;source,
java.util.List&lt;<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&gt;&nbsp;topics,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;content)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;message,
<A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A>[]&nbsp;clients,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>[]&nbsp;children)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;child)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;child)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;message,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;parent,
java.util.Collection&lt;<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&gt;&nbsp;theChildren)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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&lt;<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&gt;&nbsp;theTopics,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;content)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;failedAtNode,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;content)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This notifies us when we receive a failure for a anycast</TD>
</TR>
</TABLE>
&nbsp;<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>
&nbsp;
<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>&nbsp;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&lt;<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&gt; <B>allowSubscribe</B>(<A HREF="../../../rice/p2p/scribe/Scribe.html" title="interface in rice.p2p.scribe">Scribe</A>&nbsp;scribe,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;source,
java.util.List&lt;<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&gt;&nbsp;topics,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;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>&nbsp;message,
<A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A>[]&nbsp;clients,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>[]&nbsp;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>&nbsp;message,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;parent,
java.util.Collection&lt;<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&gt;&nbsp;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>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;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>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;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>&nbsp;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>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;failedAtNode,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;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&lt;<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&gt;&nbsp;theTopics,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ScribePolicy.DefaultScribePolicy.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../rice/p2p/scribe/ScribePolicy.html" title="interface in rice.p2p.scribe"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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> &nbsp;
&nbsp;<A HREF="ScribePolicy.DefaultScribePolicy.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2005 - Rice Pastry.</i>
</BODY>
</HTML>