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.socket
Class SocketPastryNode

    java.lang.Object
      rice.pastry.PastryNode
          rice.pastry.dist.DistPastryNode
              rice.pastry.socket.SocketPastryNode

All Implemented Interfaces:
  MessageReceiver, Node

public class SocketPastryNode
extends DistPastryNode

An Socket-based Pastry node, which has two threads - one thread for performing route set and leaf set maintainance, and another thread for listening on the sockets and performing all non-blocking I/O.

Version:
  $Id: SocketPastryNode.java,v 1.25 2005/03/11 00:58:12 jeffh Exp $
Author:
  Alan Mislove

Nested Class Summary

Nested classes inherited from class rice.pastry.dist.DistPastryNode
`DistPastryNode.ProcessingQueue, DistPastryNode.ProcessingQueueOverflowException`

Field Summary
`static boolean` | `verbose` DESCRIBE THE FIELD

Fields inherited from class rice.pastry.dist.DistPastryNode
`leafSetMaintFreq, leafSetRoutineMaintenance, QUEUE, routeSetMaintFreq, routeSetRoutineMaintenance, THREAD, timer`

Fields inherited from class rice.pastry.PastryNode
`apps, EC_NO_CODE_AVAILABLE, localhandle, myNodeId, nodeHandleSet`

Constructor Summary
`SocketPastryNode(NodeId id)` Constructor

Method Summary
`void` | `doneNode(NodeHandle bootstrap)` Called after the node is initialized.
`DistNodeHandlePool` | `getNodeHandlePool()` Returns the WireNodeHandlePool for this pastry node.
`SocketSourceRouteManager` | `getSocketSourceRouteManager()` Returns the SocketSourceRouteManager for this pastry node.
`void` | `resign()` Makes this node resign from the network.
`void` | `setSocketElements(EpochInetSocketAddress address, SocketSourceRouteManager srManager, SocketNodeHandlePool pool, int lsmf, int rsmf)` Helper method which allows the WirePastryNodeFactory to initialize a number of the pastry node's elements.
`java.lang.String` | `toString()` Prints out a String representation of this node

Methods inherited from class rice.pastry.dist.DistPastryNode
`addError, addNetworkListener, broadcastReceivedListeners, broadcastSentListeners, getErrors, getNetworkListeners, getTimer, initiateJoin, nodeIsReady, process, scheduleMsg, scheduleMsg, scheduleMsgAtFixedRate, scheduleMsgExpBackoff`

Methods inherited from class rice.pastry.PastryNode
`addLeafSetObserver, addRouteSetObserver, deleteLeafSetObserver, deleteRouteSetObserver, getErrorString, getId, getIdFactory, getLeafSet, getLocalHandle, getLocalNodeHandle, getLocalNodeI, getMessageDispatch, getNodeId, getRoutingTable, isClosest, isReady, messageNotSent, receiveMessage, registerApp, registerApplication, registerReceiver, setElements, setMessageDispatch, setReady`

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

Field Detail

### verbose

    public static final boolean verbose

  DESCRIBE THE FIELD

  See Also:
    Constant Field Values

Constructor Detail

### SocketPastryNode

    public SocketPastryNode(NodeId id)

  Constructor

Parameters:
  `id` - The NodeId of this Pastry node.

Method Detail

### getSocketSourceRouteManager

    public SocketSourceRouteManager getSocketSourceRouteManager()

  Returns the SocketSourceRouteManager for this pastry node.

  Returns:
    The SocketSourceRouteManager for this pastry node.

### getNodeHandlePool

    public DistNodeHandlePool getNodeHandlePool()

  Returns the WireNodeHandlePool for this pastry node.

  Specified by:
    `getNodeHandlePool` in class `DistPastryNode`
  Returns:
    The WireNodeHandlePool for this pastry node.

### setSocketElements

    public void setSocketElements(EpochInetSocketAddress address,
                                  SocketSourceRouteManager srManager,
                                  SocketNodeHandlePool pool,
                                  int lsmf,
                                  int rsmf)

  Helper method which allows the WirePastryNodeFactory to initialize a number of the pastry node's elements.

  Parameters:
    `address` - The address of this pastry node.
    `lsmf` - Leaf set maintenance frequency. 0 means never.
    `rsmf` - Route set maintenance frequency. 0 means never.
    `pool` - The new SocketElements value
    `srManager` - The new SocketElements value

### doneNode

    public void doneNode(NodeHandle bootstrap)

  Called after the node is initialized.

  Overrides:
    `doneNode` in class `DistPastryNode`
  Parameters:
    `bootstrap` - The node which this node should boot off of.

### toString

    public java.lang.String toString()

  Prints out a String representation of this node

  Overrides:
    `toString` in class `PastryNode`
  Returns:
    a String

### resign

    public void resign()

  Makes this node resign from the network. Is designed to be used for debugging and testing.

  Overrides:
    `resign` in class `DistPastryNode`

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.