mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 01:26:27 +00:00
1322 lines
52 KiB
HTML
1322 lines
52 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:28 CET 2009 -->
|
||
|
<TITLE>
|
||
|
LeafSet (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="LeafSet (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/LeafSet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
</TD>
|
||
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||
|
Rice Pastry API</EM>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
|
||
|
<TR>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../rice/pastry/leafset/InitiateLeafSetMaintenance.html" title="class in rice.pastry.leafset"><B>PREV CLASS</B></A>
|
||
|
<A HREF="../../../rice/pastry/leafset/LeafSetProtocol.html" title="interface in rice.pastry.leafset"><B>NEXT CLASS</B></A></FONT></TD>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../index.html?rice/pastry/leafset/LeafSet.html" target="_top"><B>FRAMES</B></A>
|
||
|
<A HREF="LeafSet.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 | 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.pastry.leafset</FONT>
|
||
|
<BR>
|
||
|
Class LeafSet</H2>
|
||
|
<PRE>
|
||
|
java.lang.Object
|
||
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.util.Observable
|
||
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.pastry.leafset.LeafSet</B>
|
||
|
</PRE>
|
||
|
<DL>
|
||
|
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Iterable<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
<DL>
|
||
|
<DT><PRE>public class <B>LeafSet</B><DT>extends java.util.Observable<DT>implements java.io.Serializable, java.lang.Iterable<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></DL>
|
||
|
</PRE>
|
||
|
|
||
|
<P>
|
||
|
A class for representing and manipulating the leaf set.
|
||
|
|
||
|
The leafset is not strictly a set: when the ring is small, a node may appear in both the cw and the ccw half of the "set".
|
||
|
<P>
|
||
|
|
||
|
<P>
|
||
|
<DL>
|
||
|
<DT><B>Version:</B></DT>
|
||
|
<DD>$Id: LeafSet.java 4654 2009-01-08 16:33:07Z jeffh $</DD>
|
||
|
<DT><B>Author:</B></DT>
|
||
|
<DD>Andrew Ladd, Peter Druschel</DD>
|
||
|
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#rice.pastry.leafset.LeafSet">Serialized Form</A></DL>
|
||
|
<HR>
|
||
|
|
||
|
<P>
|
||
|
|
||
|
<!-- ======== 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/leafset/LeafSet.html#LeafSet(rice.pastry.NodeHandle, int, boolean)">LeafSet</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> localNode,
|
||
|
int size,
|
||
|
boolean observe)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#LeafSet(rice.pastry.NodeHandle, int, boolean, rice.pastry.NodeHandle[], rice.pastry.NodeHandle[])">LeafSet</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> localNode,
|
||
|
int size,
|
||
|
boolean observe,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>[] cwTable,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>[] ccwTable)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#LeafSet(rice.pastry.NodeHandle, int, rice.pastry.routing.RoutingTable)">LeafSet</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> localNode,
|
||
|
int size,
|
||
|
<A HREF="../../../rice/pastry/routing/RoutingTable.html" title="class in rice.pastry.routing">RoutingTable</A> rt)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Constructor.</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<!-- ========== METHOD SUMMARY =========== -->
|
||
|
|
||
|
<A NAME="method_summary"><!-- --></A>
|
||
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||
|
<B>Method Summary</B></FONT></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#addNodeSetListener(rice.pastry.NodeSetListener)">addNodeSetListener</A></B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Add observer method.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#addObserver(java.util.Observer)">addObserver</A></B>(java.util.Observer o)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
<B>Deprecated.</B> <I>use addNodeSetListener</I></TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.util.List<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#asList()">asList</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
If overlaps() a NodeHandle may show up twice.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>static <A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#build(rice.p2p.commonapi.rawserialization.InputBuffer, rice.pastry.NodeHandleFactory)">build</A></B>(<A HREF="../../../rice/p2p/commonapi/rawserialization/InputBuffer.html" title="interface in rice.p2p.commonapi.rawserialization">InputBuffer</A> buf,
|
||
|
<A HREF="../../../rice/pastry/NodeHandleFactory.html" title="interface in rice.pastry">NodeHandleFactory</A> nhf)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
So that small LeafSets (who have overlapping nodes) don't waste bandwidth,
|
||
|
leafset first defines the NodeHandles to be loaded into an array, then
|
||
|
specifies their locations.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#ccwSize()">ccwSize</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Gets the current counterclockwise size.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#contains(rice.pastry.NodeHandle)">contains</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#copy()">copy</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#cwSize()">cwSize</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Gets the current clockwise size.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#deleteNodeSetListener(rice.pastry.NodeSetListener)">deleteNodeSetListener</A></B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Delete observer method.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#deleteObserver(java.util.Observer)">deleteObserver</A></B>(java.util.Observer o)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
<B>Deprecated.</B> <I>use deleteNodeSetListener</I></TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> void</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#destroy()">destroy</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#directTest(rice.pastry.NodeHandle)">directTest</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#get(int)">get</A></B>(int index)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Finds the NodeHandle at a given index.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#getIndex(rice.pastry.NodeHandle)">getIndex</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
There are 2 possible indexes (if the ring is small), the cw index and the ccw, this returns the nearest index, and if they are the same, the cw index.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#getUniqueCount()">getUniqueCount</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Returns the number of unique nodes in the leafset</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.util.Collection<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#getUniqueSet()">getUniqueSet</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Set of nodes in the leafset, not the local node, each node only once.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#isComplete()">isComplete</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>protected boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#isProperlyRemoved(rice.pastry.NodeHandle)">isProperlyRemoved</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.util.Iterator<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#iterator()">iterator</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Unordered iterator, does not contain local node.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#maxSize()">maxSize</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Gets the maximal size of the leaf set.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#member(rice.pastry.Id)">member</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> nid)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Verifies if the set contains this particular 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/pastry/leafset/LeafSet.html#member(rice.pastry.NodeHandle)">member</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nid)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Verifies if the set contains this particular handle.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#merge(rice.pastry.leafset.LeafSet, rice.pastry.NodeHandle, rice.pastry.routing.RoutingTable, boolean, java.util.Set)">merge</A></B>(<A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A> remotels,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> from,
|
||
|
<A HREF="../../../rice/pastry/routing/RoutingTable.html" title="class in rice.pastry.routing">RoutingTable</A> routeTable,
|
||
|
boolean testOnly,
|
||
|
java.util.Set<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>> insertedHandles)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Merge a remote leafset into this</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#mostSimilar(rice.pastry.Id)">mostSimilar</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> nid)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Numerically closests node to a given a node in the leaf set.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeSet.html" title="class in rice.pastry">NodeSet</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#neighborSet(int)">neighborSet</A></B>(int max)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
compute an ordered set of nodes that are neighbors of this local node,
|
||
|
in order of numerical closeness to the local node</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#overlaps()">overlaps</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Test if the leafset overlaps</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#put(rice.pastry.NodeHandle)">put</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Puts a NodeHandle into the set.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#put(rice.pastry.NodeHandle, boolean)">put</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle,
|
||
|
boolean suppressNotification)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/IdRange.html" title="class in rice.pastry">IdRange</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#range(rice.pastry.NodeHandle, int)">range</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> n,
|
||
|
int r)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
range
|
||
|
computes the range of keys for which node n is a i-root, 0<=i<=r
|
||
|
a node is the r-root for a key of the node becomes the numerically closest node to the key when
|
||
|
i-roots for the key fail, O<=i<r, where a key's 0-root is the numerically closest node to the key.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/IdRange.html" title="class in rice.pastry">IdRange</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#range(rice.pastry.NodeHandle, int, boolean)">range</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> n,
|
||
|
int r,
|
||
|
boolean cw)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
range
|
||
|
computes the ranges of keys for which node n is a r-root
|
||
|
a node is the r-root for a key of the node becomes the numerically closest node to the key when
|
||
|
i-roots for the key fail, O<=i<r, where a key's 0-root is the numerically closest node to the 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/pastry/leafset/LeafSet.html#remove(rice.pastry.NodeHandle)">remove</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Removes a node id and its handle from the set.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> <A HREF="../../../rice/pastry/NodeSet.html" title="class in rice.pastry">NodeSet</A></CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#replicaSet(rice.pastry.Id, int)">replicaSet</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
||
|
int max)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
compute an ordered set of nodes, in order of numerical closeness to a given 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/pastry/leafset/LeafSet.html#serialize(rice.p2p.commonapi.rawserialization.OutputBuffer)">serialize</A></B>(<A HREF="../../../rice/p2p/commonapi/rawserialization/OutputBuffer.html" title="interface in rice.p2p.commonapi.rawserialization">OutputBuffer</A> buf)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
So that small LeafSets (who have overlapping nodes) don't waste bandwidth,
|
||
|
leafset first defines the NodeHandles to be loaded into an array, then
|
||
|
specifies their locations.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> int</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#size()">size</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Gets the current size of the leaf set.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#test(rice.pastry.NodeHandle)">test</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Test if a put of the given NodeHandle would succeed.</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE>protected boolean</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#testOtherSet(rice.pastry.leafset.SimilarSet, rice.pastry.NodeHandle)">testOtherSet</A></B>(<A HREF="../../../rice/pastry/leafset/SimilarSet.html" title="class in rice.pastry.leafset">SimilarSet</A> set,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</CODE>
|
||
|
|
||
|
<BR>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||
|
<CODE> java.lang.String</CODE></FONT></TD>
|
||
|
<TD><CODE><B><A HREF="../../../rice/pastry/leafset/LeafSet.html#toString()">toString</A></B>()</CODE>
|
||
|
|
||
|
<BR>
|
||
|
Returns a string representation of the leaf set</TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<A NAME="methods_inherited_from_class_java.util.Observable"><!-- --></A>
|
||
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||
|
<TH ALIGN="left"><B>Methods inherited from class java.util.Observable</B></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE>clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged</CODE></TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
||
|
</TR>
|
||
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||
|
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
|
||
|
<P>
|
||
|
|
||
|
<!-- ========= 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="LeafSet(rice.pastry.NodeHandle, int, rice.pastry.routing.RoutingTable)"><!-- --></A><H3>
|
||
|
LeafSet</H3>
|
||
|
<PRE>
|
||
|
public <B>LeafSet</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> localNode,
|
||
|
int size,
|
||
|
<A HREF="../../../rice/pastry/routing/RoutingTable.html" title="class in rice.pastry.routing">RoutingTable</A> rt)</PRE>
|
||
|
<DL>
|
||
|
<DD>Constructor.
|
||
|
<P>
|
||
|
<DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>localHandle</CODE> - the local node<DD><CODE>size</CODE> - the size of the leaf set.<DD><CODE>rt</CODE> - (to fall back on for more entries on delete operations)</DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="LeafSet(rice.pastry.NodeHandle, int, boolean)"><!-- --></A><H3>
|
||
|
LeafSet</H3>
|
||
|
<PRE>
|
||
|
public <B>LeafSet</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> localNode,
|
||
|
int size,
|
||
|
boolean observe)</PRE>
|
||
|
<DL>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="LeafSet(rice.pastry.NodeHandle, int, boolean, rice.pastry.NodeHandle[], rice.pastry.NodeHandle[])"><!-- --></A><H3>
|
||
|
LeafSet</H3>
|
||
|
<PRE>
|
||
|
public <B>LeafSet</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> localNode,
|
||
|
int size,
|
||
|
boolean observe,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>[] cwTable,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>[] ccwTable)</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="put(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
put</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>put</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</PRE>
|
||
|
<DL>
|
||
|
<DD>Puts a NodeHandle into the set.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - the handle to put.
|
||
|
<DT><B>Returns:</B><DD>true if successful, false otherwise.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="put(rice.pastry.NodeHandle, boolean)"><!-- --></A><H3>
|
||
|
put</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>put</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle,
|
||
|
boolean suppressNotification)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="test(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
test</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>test</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</PRE>
|
||
|
<DL>
|
||
|
<DD>Test if a put of the given NodeHandle would succeed.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - the handle to test.
|
||
|
<DT><B>Returns:</B><DD>true if a put would succeed, false otherwise.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="overlaps()"><!-- --></A><H3>
|
||
|
overlaps</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>overlaps</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Test if the leafset overlaps
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>true if the most distant cw member appears in the ccw set or vice versa, false otherwise</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="isComplete()"><!-- --></A><H3>
|
||
|
isComplete</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>isComplete</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="getIndex(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
getIndex</H3>
|
||
|
<PRE>
|
||
|
public int <B>getIndex</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)
|
||
|
throws java.util.NoSuchElementException</PRE>
|
||
|
<DL>
|
||
|
<DD>There are 2 possible indexes (if the ring is small), the cw index and the ccw, this returns the nearest index, and if they are the same, the cw index.
|
||
|
|
||
|
Note: previous to FP2.1a3, this always returned the cw index if it existed.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>nh</CODE> -
|
||
|
<DT><B>Returns:</B><DD>
|
||
|
<DT><B>Throws:</B>
|
||
|
<DD><CODE>java.util.NoSuchElementException</CODE></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="get(int)"><!-- --></A><H3>
|
||
|
get</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>get</B>(int index)</PRE>
|
||
|
<DL>
|
||
|
<DD>Finds the NodeHandle at a given index.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>index</CODE> - an index.
|
||
|
<DT><B>Returns:</B><DD>the handle associated with that index.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="member(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
member</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>member</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nid)</PRE>
|
||
|
<DL>
|
||
|
<DD>Verifies if the set contains this particular handle.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> - a NodeHandle.
|
||
|
<DT><B>Returns:</B><DD>true if that NodeHandle is in the set, false otherwise.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="contains(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
contains</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>contains</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="member(rice.pastry.Id)"><!-- --></A><H3>
|
||
|
member</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>member</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> nid)</PRE>
|
||
|
<DL>
|
||
|
<DD>Verifies if the set contains this particular id.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> - a node id.
|
||
|
<DT><B>Returns:</B><DD>true if that node id is in the set, false otherwise.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="remove(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
remove</H3>
|
||
|
<PRE>
|
||
|
public void <B>remove</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh)</PRE>
|
||
|
<DL>
|
||
|
<DD>Removes a node id and its handle from the set.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> - the node to remove.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="maxSize()"><!-- --></A><H3>
|
||
|
maxSize</H3>
|
||
|
<PRE>
|
||
|
public int <B>maxSize</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Gets the maximal size of the leaf set.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>the size.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="size()"><!-- --></A><H3>
|
||
|
size</H3>
|
||
|
<PRE>
|
||
|
public int <B>size</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Gets the current size of the leaf set. Note that if the leafset overlaps,
|
||
|
there will be duplicates. If you want the unique nodes, use getUniqueCount().
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>the size.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="cwSize()"><!-- --></A><H3>
|
||
|
cwSize</H3>
|
||
|
<PRE>
|
||
|
public int <B>cwSize</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Gets the current clockwise size.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>the size.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="ccwSize()"><!-- --></A><H3>
|
||
|
ccwSize</H3>
|
||
|
<PRE>
|
||
|
public int <B>ccwSize</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Gets the current counterclockwise size.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>the size.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="mostSimilar(rice.pastry.Id)"><!-- --></A><H3>
|
||
|
mostSimilar</H3>
|
||
|
<PRE>
|
||
|
public int <B>mostSimilar</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> nid)</PRE>
|
||
|
<DL>
|
||
|
<DD>Numerically closests node to a given a node in the leaf set.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>nid</CODE> - a node id.
|
||
|
<DT><B>Returns:</B><DD>the index of the numerically closest node (0 if baseId is the closest).</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="neighborSet(int)"><!-- --></A><H3>
|
||
|
neighborSet</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeSet.html" title="class in rice.pastry">NodeSet</A> <B>neighborSet</B>(int max)</PRE>
|
||
|
<DL>
|
||
|
<DD>compute an ordered set of nodes that are neighbors of this local node,
|
||
|
in order of numerical closeness to the local node
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>max</CODE> - the maximal size of the set requested
|
||
|
<DT><B>Returns:</B><DD>the ordered set of nodehandles</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="replicaSet(rice.pastry.Id, int)"><!-- --></A><H3>
|
||
|
replicaSet</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/NodeSet.html" title="class in rice.pastry">NodeSet</A> <B>replicaSet</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
||
|
int max)</PRE>
|
||
|
<DL>
|
||
|
<DD>compute an ordered set of nodes, in order of numerical closeness to a given key
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key<DD><CODE>max</CODE> - the maximal size of the set requested
|
||
|
<DT><B>Returns:</B><DD>the ordered set of nodehandles</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="getUniqueCount()"><!-- --></A><H3>
|
||
|
getUniqueCount</H3>
|
||
|
<PRE>
|
||
|
public int <B>getUniqueCount</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Returns the number of unique nodes in the leafset
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>the number of unique nodes in the leafset</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="iterator()"><!-- --></A><H3>
|
||
|
iterator</H3>
|
||
|
<PRE>
|
||
|
public java.util.Iterator<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>> <B>iterator</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Unordered iterator, does not contain local node. Contains each element only once.
|
||
|
|
||
|
TODO: Make this in order from nearest neighbor to farthest neighbor, not by replica, but take cw[0], cc2[0], cw[1], ccw[1] etc...
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
<DT><B>Specified by:</B><DD><CODE>iterator</CODE> in interface <CODE>java.lang.Iterable<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>></CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="getUniqueSet()"><!-- --></A><H3>
|
||
|
getUniqueSet</H3>
|
||
|
<PRE>
|
||
|
public java.util.Collection<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>> <B>getUniqueSet</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Set of nodes in the leafset, not the local node, each node only once.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="range(rice.pastry.NodeHandle, int)"><!-- --></A><H3>
|
||
|
range</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/IdRange.html" title="class in rice.pastry">IdRange</A> <B>range</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> n,
|
||
|
int r)</PRE>
|
||
|
<DL>
|
||
|
<DD>range
|
||
|
computes the range of keys for which node n is a i-root, 0<=i<=r
|
||
|
a node is the r-root for a key of the node becomes the numerically closest node to the key when
|
||
|
i-roots for the key fail, O<=i<r, where a key's 0-root is the numerically closest node to the key.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the nodehandle<DD><CODE>r</CODE> -
|
||
|
<DT><B>Returns:</B><DD>the range of keys, or null if n is not a member of the leafset, or if the range cannot be computed</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="range(rice.pastry.NodeHandle, int, boolean)"><!-- --></A><H3>
|
||
|
range</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/IdRange.html" title="class in rice.pastry">IdRange</A> <B>range</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> n,
|
||
|
int r,
|
||
|
boolean cw)</PRE>
|
||
|
<DL>
|
||
|
<DD>range
|
||
|
computes the ranges of keys for which node n is a r-root
|
||
|
a node is the r-root for a key of the node becomes the numerically closest node to the key when
|
||
|
i-roots for the key fail, O<=i<r, where a key's 0-root is the numerically closest node to the key.
|
||
|
there can be two contiguous ranges of keys; the cw parameter selects which one is returned.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the nodehandle<DD><CODE>r</CODE> - <DD><CODE>cw</CODE> - if true returns the clockwise range, else the counterclockwise range
|
||
|
<DT><B>Returns:</B><DD>the range of keys, or null if n is not a member of the leafset, or if the range cannot be computed</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="merge(rice.pastry.leafset.LeafSet, rice.pastry.NodeHandle, rice.pastry.routing.RoutingTable, boolean, java.util.Set)"><!-- --></A><H3>
|
||
|
merge</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>merge</B>(<A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A> remotels,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> from,
|
||
|
<A HREF="../../../rice/pastry/routing/RoutingTable.html" title="class in rice.pastry.routing">RoutingTable</A> routeTable,
|
||
|
boolean testOnly,
|
||
|
java.util.Set<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>> insertedHandles)</PRE>
|
||
|
<DL>
|
||
|
<DD>Merge a remote leafset into this
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>remotels</CODE> - the remote leafset<DD><CODE>from</CODE> - the node from which we received the leafset<DD><CODE>routeTable</CODE> - the routing table<DD><CODE>security</CODE> - the security manager<DD><CODE>testOnly</CODE> - if true, do not change the leafset<DD><CODE>insertedHandles</CODE> - if not null, a Set that contains, upon return of this method, the nodeHandles that would be inserted into this LeafSet if testOnly is true
|
||
|
<DT><B>Returns:</B><DD>true if the local leafset changed</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="addObserver(java.util.Observer)"><!-- --></A><H3>
|
||
|
addObserver</H3>
|
||
|
<PRE>
|
||
|
public void <B>addObserver</B>(java.util.Observer o)</PRE>
|
||
|
<DL>
|
||
|
<DD><B>Deprecated.</B> <I>use addNodeSetListener</I>
|
||
|
<P>
|
||
|
<DD>Add observer method.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
<DT><B>Overrides:</B><DD><CODE>addObserver</CODE> in class <CODE>java.util.Observable</CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the observer to add.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="deleteObserver(java.util.Observer)"><!-- --></A><H3>
|
||
|
deleteObserver</H3>
|
||
|
<PRE>
|
||
|
public void <B>deleteObserver</B>(java.util.Observer o)</PRE>
|
||
|
<DL>
|
||
|
<DD><B>Deprecated.</B> <I>use deleteNodeSetListener</I>
|
||
|
<P>
|
||
|
<DD>Delete observer method.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
<DT><B>Overrides:</B><DD><CODE>deleteObserver</CODE> in class <CODE>java.util.Observable</CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the observer to delete.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="addNodeSetListener(rice.pastry.NodeSetListener)"><!-- --></A><H3>
|
||
|
addNodeSetListener</H3>
|
||
|
<PRE>
|
||
|
public void <B>addNodeSetListener</B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</PRE>
|
||
|
<DL>
|
||
|
<DD>Add observer method.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the observer to add.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="deleteNodeSetListener(rice.pastry.NodeSetListener)"><!-- --></A><H3>
|
||
|
deleteNodeSetListener</H3>
|
||
|
<PRE>
|
||
|
public void <B>deleteNodeSetListener</B>(<A HREF="../../../rice/pastry/NodeSetListener.html" title="interface in rice.pastry">NodeSetListener</A> listener)</PRE>
|
||
|
<DL>
|
||
|
<DD>Delete observer method.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the observer to delete.</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="toString()"><!-- --></A><H3>
|
||
|
toString</H3>
|
||
|
<PRE>
|
||
|
public java.lang.String <B>toString</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>Returns a string representation of the leaf set
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="isProperlyRemoved(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
isProperlyRemoved</H3>
|
||
|
<PRE>
|
||
|
protected boolean <B>isProperlyRemoved</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="testOtherSet(rice.pastry.leafset.SimilarSet, rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
testOtherSet</H3>
|
||
|
<PRE>
|
||
|
protected boolean <B>testOtherSet</B>(<A HREF="../../../rice/pastry/leafset/SimilarSet.html" title="class in rice.pastry.leafset">SimilarSet</A> set,
|
||
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="directTest(rice.pastry.NodeHandle)"><!-- --></A><H3>
|
||
|
directTest</H3>
|
||
|
<PRE>
|
||
|
public boolean <B>directTest</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> handle)</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="copy()"><!-- --></A><H3>
|
||
|
copy</H3>
|
||
|
<PRE>
|
||
|
public <A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A> <B>copy</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="build(rice.p2p.commonapi.rawserialization.InputBuffer, rice.pastry.NodeHandleFactory)"><!-- --></A><H3>
|
||
|
build</H3>
|
||
|
<PRE>
|
||
|
public static <A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A> <B>build</B>(<A HREF="../../../rice/p2p/commonapi/rawserialization/InputBuffer.html" title="interface in rice.p2p.commonapi.rawserialization">InputBuffer</A> buf,
|
||
|
<A HREF="../../../rice/pastry/NodeHandleFactory.html" title="interface in rice.pastry">NodeHandleFactory</A> nhf)
|
||
|
throws java.io.IOException</PRE>
|
||
|
<DL>
|
||
|
<DD>So that small LeafSets (who have overlapping nodes) don't waste bandwidth,
|
||
|
leafset first defines the NodeHandles to be loaded into an array, then
|
||
|
specifies their locations. We do this because
|
||
|
a NodeHandle takes up a lot more space than the index in the leafset, and
|
||
|
it may be in the leafset 1 or 2 times.
|
||
|
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ byte theSize +numUniqueHandls+ byte cwSize + byte ccwSize +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ NodeHandle baseHandle +
|
||
|
...
|
||
|
+ +
|
||
|
+ +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ NodeHandle 1st +
|
||
|
...
|
||
|
+ +
|
||
|
+ +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
...
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ NodeHandle numUniqueHandls-th +
|
||
|
...
|
||
|
+ +
|
||
|
+ +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ byte cw 1st + cw 2nd + ... + ccw 1st +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ ccw 2nd + ... + ... + ccw Nth +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Throws:</B>
|
||
|
<DD><CODE>java.io.IOException</CODE></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="serialize(rice.p2p.commonapi.rawserialization.OutputBuffer)"><!-- --></A><H3>
|
||
|
serialize</H3>
|
||
|
<PRE>
|
||
|
public void <B>serialize</B>(<A HREF="../../../rice/p2p/commonapi/rawserialization/OutputBuffer.html" title="interface in rice.p2p.commonapi.rawserialization">OutputBuffer</A> buf)
|
||
|
throws java.io.IOException</PRE>
|
||
|
<DL>
|
||
|
<DD>So that small LeafSets (who have overlapping nodes) don't waste bandwidth,
|
||
|
leafset first defines the NodeHandles to be loaded into an array, then
|
||
|
specifies their locations. We do this because
|
||
|
a NodeHandle takes up a lot more space than the index in the leafset, and
|
||
|
it may be in the leafset 1 or 2 times.
|
||
|
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ byte theSize +numUniqueHandls+ byte cwSize + byte ccwSize +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ NodeHandle baseHandle +
|
||
|
...
|
||
|
+ +
|
||
|
+ +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ NodeHandle 1st +
|
||
|
...
|
||
|
+ +
|
||
|
+ +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
...
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ NodeHandle numUniqueHandls-th +
|
||
|
...
|
||
|
+ +
|
||
|
+ +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ byte cw 1st + cw 2nd + ... + ccw 1st +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
+ ccw 2nd + ... + ... + ccw Nth +
|
||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
|
|
||
|
TODO 2.23.2006 the synchronization of LeafSet is nonexistent
|
||
|
and it's difficult to add because the listeneer interface should not
|
||
|
be called while holding a lock, but the lock should be acquired once while
|
||
|
making the change
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Throws:</B>
|
||
|
<DD><CODE>java.io.IOException</CODE></DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="asList()"><!-- --></A><H3>
|
||
|
asList</H3>
|
||
|
<PRE>
|
||
|
public java.util.List<<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A>> <B>asList</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD>If overlaps() a NodeHandle may show up twice. Does not return self.
|
||
|
<P>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
|
||
|
<DT><B>Returns:</B><DD>list of NodeHandle</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<HR>
|
||
|
|
||
|
<A NAME="destroy()"><!-- --></A><H3>
|
||
|
destroy</H3>
|
||
|
<PRE>
|
||
|
public void <B>destroy</B>()</PRE>
|
||
|
<DL>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DD><DL>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
</DL>
|
||
|
<!-- ========= END OF CLASS DATA ========= -->
|
||
|
<HR>
|
||
|
|
||
|
|
||
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||
|
<A NAME="navbar_bottom"><!-- --></A>
|
||
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||
|
<TR>
|
||
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||
|
<TR ALIGN="center" VALIGN="top">
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LeafSet.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
</TD>
|
||
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||
|
Rice Pastry API</EM>
|
||
|
</TD>
|
||
|
</TR>
|
||
|
|
||
|
<TR>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../rice/pastry/leafset/InitiateLeafSetMaintenance.html" title="class in rice.pastry.leafset"><B>PREV CLASS</B></A>
|
||
|
<A HREF="../../../rice/pastry/leafset/LeafSetProtocol.html" title="interface in rice.pastry.leafset"><B>NEXT CLASS</B></A></FONT></TD>
|
||
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||
|
<A HREF="../../../index.html?rice/pastry/leafset/LeafSet.html" target="_top"><B>FRAMES</B></A>
|
||
|
<A HREF="LeafSet.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 | 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>
|