FreePastry/docs/javadoc/rice/pastry/standard/PartitionHandler.html

607 lines
26 KiB
HTML
Raw Permalink Normal View History

2019-05-13 16:45:05 +04:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Fri Mar 13 20:01:36 CET 2009 -->
<TITLE>
PartitionHandler (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="PartitionHandler (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/PartitionHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../rice/pastry/standard/IPNodeIdFactory.html" title="class in rice.pastry.standard"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../rice/pastry/standard/PeriodicLeafSetProtocol.html" title="class in rice.pastry.standard"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?rice/pastry/standard/PartitionHandler.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PartitionHandler.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.pastry.standard</FONT>
<BR>
Class PartitionHandler</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../rice/selector/TimerTask.html" title="class in rice.selector">rice.selector.TimerTask</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.pastry.standard.PartitionHandler</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Comparable&lt;<A HREF="../../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A>&gt;, <A HREF="../../../rice/p2p/commonapi/Cancellable.html" title="interface in rice.p2p.commonapi">Cancellable</A>, <A HREF="../../../rice/p2p/commonapi/CancellableTask.html" title="interface in rice.p2p.commonapi">CancellableTask</A>, <A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>PartitionHandler</B><DT>extends <A HREF="../../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A><DT>implements <A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A></DL>
</PRE>
<P>
The PartitionHandler does two things: it collects a list of candidate nodes
that may be in another partition, and it periodically tries to reach these
nodes to heal a partition. I can refactor the code to expose a method that
heals a partition tomorrow for you, but I'll paste the code below for the
moment.
The basic theory of healing a partition is to send a join request via a node
that may not be in your partition. Join requests get routed to your own key.
If the request comes back to you, then that node is in your partition and
nothing needs to be done. If the request ends up at another node, it will
discover your existence and begin integrating the two rings, just as if you
were creating your local node for the first time.
The way we look for candidate nodes is we choose a mix of the original
bootstraps (as a last resort fallback) and nodes that we once believed were
alive but are no longer in contact with. The idea is we may have declared
those nodes dead due to losing connectivity to them but at some later point
we again may be able to contact them.
The reason that we make the PartitionHandler a periodic process is that in
general you can't tell that a partition has happened.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>jstewart</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>protected &nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#bootstrapRate">bootstrapRate</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.net.InetSocketAddress[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#bootstraps">bootstraps</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#env">env</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../rice/pastry/socket/SocketPastryNodeFactory.html" title="class in rice.pastry.socket">SocketPastryNodeFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#factory">factory</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Map&lt;<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A>,rice.pastry.standard.PartitionHandler.GoneSetEntry&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#gone">gone</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#logger">logger</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#maxGoneAge">maxGoneAge</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#maxGoneSize">maxGoneSize</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#pastryNode">pastryNode</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_rice.selector.TimerTask"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class rice.selector.<A HREF="../../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../rice/selector/TimerTask.html#cancelled">cancelled</A>, <A HREF="../../../rice/selector/TimerTask.html#fixedRate">fixedRate</A>, <A HREF="../../../rice/selector/TimerTask.html#period">period</A>, <A HREF="../../../rice/selector/TimerTask.html#selector">selector</A>, <A HREF="../../../rice/selector/TimerTask.html#seq">seq</A></CODE></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/pastry/standard/PartitionHandler.html#PartitionHandler(rice.pastry.PastryNode, rice.pastry.socket.SocketPastryNodeFactory, java.net.InetSocketAddress[])">PartitionHandler</A></B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A>&nbsp;pn,
<A HREF="../../../rice/pastry/socket/SocketPastryNodeFactory.html" title="class in rice.pastry.socket">SocketPastryNodeFactory</A>&nbsp;factory,
java.net.InetSocketAddress[]&nbsp;bootstraps)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a PartitionHandler.</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;<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#getCandidateNode()">getCandidateNode</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method randomly returns a node that was once in the LeafSet or in
the routing table but has since been removed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#nodeSetUpdate(rice.pastry.NodeSetEventSource, rice.pastry.NodeHandle, boolean)">nodeSetUpdate</A></B>(<A HREF="../../../rice/pastry/NodeSetEventSource.html" title="interface in rice.pastry">NodeSetEventSource</A>&nbsp;nodeSetEventSource,
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>&nbsp;handle,
boolean&nbsp;added)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#rejoin(rice.pastry.NodeHandle)">rejoin</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>&nbsp;target)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manually kicks off a probe to a given target node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#run()">run</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/pastry/standard/PartitionHandler.html#start(rice.selector.Timer)">start</A></B>(<A HREF="../../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A>&nbsp;timer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method starts the PartitionHandler's probing of candidate nodes.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_rice.selector.TimerTask"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class rice.selector.<A HREF="../../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../rice/selector/TimerTask.html#cancel()">cancel</A>, <A HREF="../../../rice/selector/TimerTask.html#compareTo(rice.selector.TimerTask)">compareTo</A>, <A HREF="../../../rice/selector/TimerTask.html#execute(rice.environment.time.TimeSource)">execute</A>, <A HREF="../../../rice/selector/TimerTask.html#isCancelled()">isCancelled</A>, <A HREF="../../../rice/selector/TimerTask.html#scheduledExecutionTime()">scheduledExecutionTime</A>, <A HREF="../../../rice/selector/TimerTask.html#setNextExecutionTime(long)">setNextExecutionTime</A>, <A HREF="../../../rice/selector/TimerTask.html#setSelectorManager(rice.selector.SelectorManager)">setSelectorManager</A></CODE></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="pastryNode"><!-- --></A><H3>
pastryNode</H3>
<PRE>
protected <A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> <B>pastryNode</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="bootstraps"><!-- --></A><H3>
bootstraps</H3>
<PRE>
protected java.net.InetSocketAddress[] <B>bootstraps</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="factory"><!-- --></A><H3>
factory</H3>
<PRE>
protected <A HREF="../../../rice/pastry/socket/SocketPastryNodeFactory.html" title="class in rice.pastry.socket">SocketPastryNodeFactory</A> <B>factory</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="logger"><!-- --></A><H3>
logger</H3>
<PRE>
protected <A HREF="../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A> <B>logger</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="bootstrapRate"><!-- --></A><H3>
bootstrapRate</H3>
<PRE>
protected double <B>bootstrapRate</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="maxGoneSize"><!-- --></A><H3>
maxGoneSize</H3>
<PRE>
protected int <B>maxGoneSize</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="maxGoneAge"><!-- --></A><H3>
maxGoneAge</H3>
<PRE>
protected int <B>maxGoneAge</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="gone"><!-- --></A><H3>
gone</H3>
<PRE>
protected java.util.Map&lt;<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A>,rice.pastry.standard.PartitionHandler.GoneSetEntry&gt; <B>gone</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="env"><!-- --></A><H3>
env</H3>
<PRE>
protected <A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> <B>env</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="PartitionHandler(rice.pastry.PastryNode, rice.pastry.socket.SocketPastryNodeFactory, java.net.InetSocketAddress[])"><!-- --></A><H3>
PartitionHandler</H3>
<PRE>
public <B>PartitionHandler</B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A>&nbsp;pn,
<A HREF="../../../rice/pastry/socket/SocketPastryNodeFactory.html" title="class in rice.pastry.socket">SocketPastryNodeFactory</A>&nbsp;factory,
java.net.InetSocketAddress[]&nbsp;bootstraps)</PRE>
<DL>
<DD>Constructs a PartitionHandler. This will register the handler with the
pastry node to begin collecting candidates nodes that may be in a
partition, but it will not initiate probing. You must call the start()
method to do that.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>pn</CODE> - the local pastry node<DD><CODE>factory</CODE> - the SocketPastryNodeFactory<DD><CODE>bootstraps</CODE> - </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="getCandidateNode()"><!-- --></A><H3>
getCandidateNode</H3>
<PRE>
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>getCandidateNode</B>()</PRE>
<DL>
<DD>This method randomly returns a node that was once in the LeafSet or in
the routing table but has since been removed. The idea is that the node
may have been removed because it suffered a network outage that left it
in a partition of the ring.
This method may also return a node from the current routing table if it
doesn't know of sufficient nodes that have left to pick a good one.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a NodeHandle that may be in another partition, or null if no nodes
have left the routing table or LeafSet, and the routing table is empty.</DL>
</DD>
</DL>
<HR>
<A NAME="run()"><!-- --></A><H3>
run</H3>
<PRE>
public void <B>run</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/commonapi/CancellableTask.html#run()">run</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/commonapi/CancellableTask.html" title="interface in rice.p2p.commonapi">CancellableTask</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/selector/TimerTask.html#run()">run</A></CODE> in class <CODE><A HREF="../../../rice/selector/TimerTask.html" title="class in rice.selector">TimerTask</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="nodeSetUpdate(rice.pastry.NodeSetEventSource, rice.pastry.NodeHandle, boolean)"><!-- --></A><H3>
nodeSetUpdate</H3>
<PRE>
public void <B>nodeSetUpdate</B>(<A HREF="../../../rice/pastry/NodeSetEventSource.html" title="interface in rice.pastry">NodeSetEventSource</A>&nbsp;nodeSetEventSource,
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>&nbsp;handle,
boolean&nbsp;added)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/pastry/NodeSetListener.html#nodeSetUpdate(rice.pastry.NodeSetEventSource, rice.pastry.NodeHandle, boolean)">nodeSetUpdate</A></CODE> in interface <CODE><A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="start(rice.selector.Timer)"><!-- --></A><H3>
start</H3>
<PRE>
public void <B>start</B>(<A HREF="../../../rice/selector/Timer.html" title="interface in rice.selector">Timer</A>&nbsp;timer)</PRE>
<DL>
<DD>This method starts the PartitionHandler's probing of candidate nodes.
It should be called after the handler is constructed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timer</CODE> - the timer used to schedule partition checks (normally from the environment)</DL>
</DD>
</DL>
<HR>
<A NAME="rejoin(rice.pastry.NodeHandle)"><!-- --></A><H3>
rejoin</H3>
<PRE>
public void <B>rejoin</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>&nbsp;target)</PRE>
<DL>
<DD>Manually kicks off a probe to a given target node. This can be used to
manually heal a partition if you know via some external mechanism that one
occurred.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - the node to rejoin through</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/PartitionHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../rice/pastry/standard/IPNodeIdFactory.html" title="class in rice.pastry.standard"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../rice/pastry/standard/PeriodicLeafSetProtocol.html" title="class in rice.pastry.standard"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?rice/pastry/standard/PartitionHandler.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PartitionHandler.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>