Rice Pastry API

rice.pastry.direct
Class DirectPastryNodeFactory

java.lang.Object
  |
  +--rice.pastry.PastryNodeFactory
        |
        +--rice.pastry.direct.DirectPastryNodeFactory

public class DirectPastryNodeFactory
extends PastryNodeFactory

Pastry node factory for direct connections between nodes (local instances).

Version:
$Id: DirectPastryNodeFactory.java,v 1.32 2003/09/27 02:49:47 amislove Exp $
Author:
Andrew Ladd, Sitaram Iyer, Rongmei Zhang/Y. Charlie Hu

Constructor Summary
DirectPastryNodeFactory(rice.pastry.NodeIdFactory nf, rice.pastry.direct.NetworkSimulator sim)
           
 
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.
 rice.pastry.direct.NetworkSimulator getNetworkSimulator()
           
 int getProximity(rice.pastry.NodeHandle local, rice.pastry.NodeHandle remote)
          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 newNode(rice.pastry.NodeHandle bootstrap)
          Manufacture a new Pastry node.
 rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap, rice.pastry.NodeId nodeId)
          Manufacture a new Pastry node.
 
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

DirectPastryNodeFactory

public DirectPastryNodeFactory(rice.pastry.NodeIdFactory nf,
                               rice.pastry.direct.NetworkSimulator sim)
Method Detail

getNetworkSimulator

public rice.pastry.direct.NetworkSimulator getNetworkSimulator()

newNode

public rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap)
Manufacture a new Pastry node.

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

newNode

public rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap,
                                      rice.pastry.NodeId nodeId)
Manufacture a new Pastry node.

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

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 remote)
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:
remote - The handle to determine the proximity of
Returns:
The proximity of the provided handle

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection