Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 2895 2006-01-09 17:09:02Z jeffh $
Author:
  Andrew Ladd, Sitaram Iyer, Rongmei Zhang/Y. Charlie Hu

Field Summary

Fields inherited from class rice.pastry.PastryNodeFactory
`environment, logger, lSetSize, rtBase, rtMax`

Constructor Summary
`DirectPastryNodeFactory(NodeIdFactory nf, NetworkSimulator sim, Environment env)` Main constructor.

Method Summary
`LeafSet` | `getLeafSet(NodeHandle handle)` This method returns the remote leafset of the provided handle to the caller, in a protocol-dependent fashion.
`CancellableTask` | `getLeafSet(NodeHandle handle, Continuation c)` Gets the LeafSet attribute of the DirectPastryNodeFactory object
`NetworkSimulator` | `getNetworkSimulator()` Getter for the NetworkSimulator.
`int` | `getProximity(NodeHandle local, NodeHandle remote)` This method determines and returns the proximity of the current local node the provided NodeHandle.
`RouteSet[]` | `getRouteRow(NodeHandle handle, int row)` This method returns the remote route row of the provided handle to the caller, in a protocol-dependent fashion.
`CancellableTask` | `getRouteRow(NodeHandle handle, int row, Continuation c)` Gets the RouteRow attribute of the DirectPastryNodeFactory object
`PastryNode` | `newNode(NodeHandle bootstrap)` Manufacture a new Pastry node.
`PastryNode` | `newNode(NodeHandle bootstrap, NodeId nodeId)` Manufacture a new Pastry node.

Methods inherited from class rice.pastry.PastryNodeFactory
`getEnvironment, getNearest`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DirectPastryNodeFactory

    public DirectPastryNodeFactory(NodeIdFactory nf,
                                   NetworkSimulator sim,
                                   Environment env)

  Main constructor.

Parameters:
  `nf` - the NodeIdFactory
  `sim` - the NetworkSimulator
  `env` - DESCRIBE THE PARAMETER

Method Detail

### getNetworkSimulator

    public NetworkSimulator getNetworkSimulator()

  Getter for the NetworkSimulator.

  Returns:
    the NetworkSimulator we are using.

### getLeafSet

    public LeafSet getLeafSet(NodeHandle handle)
                       throws java.io.IOException

  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
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### getLeafSet

    public CancellableTask getLeafSet(NodeHandle handle,
                                      Continuation c)

  Gets the LeafSet attribute of the DirectPastryNodeFactory object

  Specified by:
    `getLeafSet` in class `PastryNodeFactory`
  Parameters:
    `handle` - DESCRIBE THE PARAMETER
    `c` - DESCRIBE THE PARAMETER
  Returns:
    The LeafSet value

### getRouteRow

    public RouteSet[] getRouteRow(NodeHandle handle,
                                  int row)
                           throws java.io.IOException

  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
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### getRouteRow

    public CancellableTask getRouteRow(NodeHandle handle,
                                       int row,
                                       Continuation c)

  Gets the RouteRow attribute of the DirectPastryNodeFactory object

  Specified by:
    `getRouteRow` in class `PastryNodeFactory`
  Parameters:
    `handle` - DESCRIBE THE PARAMETER
    `row` - DESCRIBE THE PARAMETER
    `c` - DESCRIBE THE PARAMETER
  Returns:
    The RouteRow value

### getProximity

    public int getProximity(NodeHandle local,
                            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:
    `local` - DESCRIBE THE PARAMETER
    `remote` - DESCRIBE THE PARAMETER
  Returns:
    The proximity of the provided handle

### newNode

    public PastryNode newNode(NodeHandle bootstrap)

  Manufacture a new Pastry node.

  Specified by:
    `newNode` in class `PastryNodeFactory`
  Parameters:
    `bootstrap` - DESCRIBE THE PARAMETER
  Returns:
    a new PastryNode

### newNode

    public PastryNode newNode(NodeHandle bootstrap,
                              NodeId nodeId)

  Manufacture a new Pastry node.

  Specified by:
    `newNode` in class `PastryNodeFactory`
  Parameters:
    `bootstrap` - DESCRIBE THE PARAMETER
    `nodeId` - DESCRIBE THE PARAMETER
  Returns:
    a new PastryNode

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.