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 DirectPastryNode

    java.lang.Object
      rice.pastry.PastryNode
          rice.pastry.direct.DirectPastryNode

All Implemented Interfaces:
  MessageReceiver, Node

public class DirectPastryNode
extends PastryNode

Direct pastry node. Subclasses PastryNode, and does about nothing else.

Version:
  $Id: DirectPastryNode.java,v 1.12 2005/03/11 00:58:12 jeffh Exp $
Author:
  Sitaram Iyer

Field Summary
`protected Timer` | `timer` DESCRIBE THE FIELD

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

Constructor Summary
`DirectPastryNode(NodeId id, NetworkSimulator sim)` Constructor for DirectPastryNode.

Method Summary
`void` | `doneNode(NodeHandle bootstrap)` DESCRIBE THE METHOD
`void` | `initiateJoin(NodeHandle bootstrap)` Sends an InitiateJoin message to itself.
`void` | `nodeIsReady()` Called from PastryNode after the join succeeds.
`ScheduledMessage` | `scheduleMsg(Message msg, long delay)` Schedule the specified message to be sent to the local node after a specified delay.
`ScheduledMessage` | `scheduleMsg(Message msg, long delay, long period)` Schedule the specified message for repeated fixed-delay delivery to the local node, beginning after the specified delay.
`ScheduledMessage` | `scheduleMsgAtFixedRate(Message msg, long delay, long period)` Schedule the specified message for repeated fixed-rate delivery to the local node, beginning after the specified delay.
`void` | `setDirectElements()` Sets the DirectElements attribute of the DirectPastryNode object

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, toString`

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

Field Detail

### timer

    protected Timer timer

  DESCRIBE THE FIELD

Constructor Detail

### DirectPastryNode

    public DirectPastryNode(NodeId id,
                            NetworkSimulator sim)

  Constructor for DirectPastryNode.

Parameters:
  `id` - DESCRIBE THE PARAMETER
  `sim` - DESCRIBE THE PARAMETER

Method Detail

### setDirectElements

    public void setDirectElements()

  Sets the DirectElements attribute of the DirectPastryNode object

### doneNode

    public void doneNode(NodeHandle bootstrap)

  DESCRIBE THE METHOD

  Parameters:
    `bootstrap` - DESCRIBE THE PARAMETER

### initiateJoin

    public final void initiateJoin(NodeHandle bootstrap)

  Sends an InitiateJoin message to itself.

  Specified by:
    `initiateJoin` in class `PastryNode`
  Parameters:
    `bootstrap` - Node handle to bootstrap with.

### nodeIsReady

    public final void nodeIsReady()

  Called from PastryNode after the join succeeds.

  Specified by:
    `nodeIsReady` in class `PastryNode`

### scheduleMsg

    public ScheduledMessage scheduleMsg(Message msg,
                                        long delay)

  Schedule the specified message to be sent to the local node after a specified delay. Useful to provide timeouts.

  Specified by:
    `scheduleMsg` in class `PastryNode`
  Parameters:
    `msg` - a message that will be delivered to the local node after the specified delay
    `delay` - time in milliseconds before message is to be delivered
  Returns:
    the scheduled event object; can be used to cancel the message

### scheduleMsg

    public ScheduledMessage scheduleMsg(Message msg,
                                        long delay,
                                        long period)

  Schedule the specified message for repeated fixed-delay delivery to the local node, beginning after the specified delay. Subsequent executions take place at approximately regular intervals separated by the specified period. Useful to initiate periodic tasks.

  Specified by:
    `scheduleMsg` in class `PastryNode`
  Parameters:
    `msg` - a message that will be delivered to the local node after the specified delay
    `delay` - time in milliseconds before message is to be delivered
    `period` - time in milliseconds between successive message deliveries
  Returns:
    the scheduled event object; can be used to cancel the message

### scheduleMsgAtFixedRate

    public ScheduledMessage scheduleMsgAtFixedRate(Message msg,
                                                   long delay,
                                                   long period)

  Schedule the specified message for repeated fixed-rate delivery to the local node, beginning after the specified delay. Subsequent executions take place at approximately regular intervals, separated by the specified period.

  Specified by:
    `scheduleMsgAtFixedRate` in class `PastryNode`
  Parameters:
    `msg` - a message that will be delivered to the local node after the specified delay
    `delay` - time in milliseconds before message is to be delivered
    `period` - time in milliseconds between successive message deliveries
  Returns:
    the scheduled event object; can be used to cancel the message

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.