Rice Pastry API

rice.pastry.multiring
Class MultiRingPastryNodeFactory

java.lang.Object
  |
  +--rice.pastry.PastryNodeFactory
        |
        +--rice.pastry.multiring.MultiRingPastryNodeFactory

public class MultiRingPastryNodeFactory
extends PastryNodeFactory

This class represents a factory for MultiRing pastry nodes. In order to use this class, one should use the static method getMultiRingFactory(), which will return a new factory ready for use.

Version:
$Id: MultiRingPastryNodeFactory.java,v 1.5 2003/08/25 04:24:25 amislove Exp $
Author:
Alan Mislove

Constructor Summary
MultiRingPastryNodeFactory(rice.pastry.PastryNodeFactory factory)
           
 
Method Summary
 rice.pastry.leafset.LeafSet getLeafSet(rice.pastry.NodeHandle handle)
          This method returns the remote leafset of the provided handle to the caller, in a protocol-dependent fashion.
 int getProximity(rice.pastry.NodeHandle local, rice.pastry.NodeHandle handle)
          This method determines and returns the proximity of the current local node the provided NodeHandle.
 rice.pastry.routing.RouteSet[] getRouteRow(rice.pastry.NodeHandle handle, int row)
          This method returns the remote route row of the provided handle to the caller, in a protocol-dependent fashion.
 rice.pastry.PastryNode joinRing(rice.pastry.multiring.MultiRingPastryNode parentNode, rice.pastry.NodeHandle bootstrap)
           
 rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap)
          Call this to construct a new node of the type chosen by the factory.
 rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap, rice.pastry.NodeId nodeId)
          Call this to construct a new node of the type chosen by the factory, with the given nodeId.
 
Methods inherited from class rice.pastry.PastryNodeFactory
getNearest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiRingPastryNodeFactory

public MultiRingPastryNodeFactory(rice.pastry.PastryNodeFactory factory)
Method Detail

newNode

public rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap)
Description copied from class: PastryNodeFactory
Call this to construct a new node of the type chosen by the factory.

Specified by:
newNode in class PastryNodeFactory
Parameters:
bootstrap - The node handle to bootstrap off of

newNode

public rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap,
                                      rice.pastry.NodeId nodeId)
Description copied from class: PastryNodeFactory
Call this to construct a new node of the type chosen by the factory, with the given nodeId.

Specified by:
newNode in class PastryNodeFactory
Parameters:
bootstrap - The node handle to bootstrap off of
nodeId - The nodeId of the new node

joinRing

public rice.pastry.PastryNode joinRing(rice.pastry.multiring.MultiRingPastryNode parentNode,
                                       rice.pastry.NodeHandle bootstrap)

getLeafSet

public rice.pastry.leafset.LeafSet getLeafSet(rice.pastry.NodeHandle handle)
This method returns the remote leafset of the provided handle to the caller, in a protocol-dependent fashion. Note that this method may block while sending the message across the wire.

Specified by:
getLeafSet in class PastryNodeFactory
Parameters:
handle - The node to connect to
Returns:
The leafset of the remote node

getRouteRow

public rice.pastry.routing.RouteSet[] getRouteRow(rice.pastry.NodeHandle handle,
                                                  int row)
This method returns the remote route row of the provided handle to the caller, in a protocol-dependent fashion. Note that this method may block while sending the message across the wire.

Specified by:
getRouteRow in class PastryNodeFactory
Parameters:
handle - The node to connect to
row - The row number to retrieve
Returns:
The route row of the remote node

getProximity

public int getProximity(rice.pastry.NodeHandle local,
                        rice.pastry.NodeHandle handle)
This method determines and returns the proximity of the current local node the provided NodeHandle. This will need to be done in a protocol- dependent fashion and may need to be done in a special way.

Specified by:
getProximity in class PastryNodeFactory
Parameters:
handle - The handle to determine the proximity of
Returns:
The proximity of the provided handle

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection