Rice Pastry API

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.9 2003/03/18 03:08:22 amislove Exp $
Author:
Sitaram Iyer

Field Summary
 
Fields inherited from class rice.pastry.PastryNode
apps, localhandle, myNodeId
 
Constructor Summary
DirectPastryNode(rice.pastry.NodeId id, rice.pastry.direct.NetworkSimulator sim)
           
 
Method Summary
 void doneNode(rice.pastry.NodeHandle bootstrap)
           
 void initiateJoin(rice.pastry.NodeHandle bootstrap)
          Sends an InitiateJoin message to itself.
 void nodeIsReady()
          Called from PastryNode after the join succeeds.
 rice.pastry.ScheduledMessage scheduleMsg(rice.pastry.messaging.Message msg, long delay)
          Schedule the specified message to be sent to the local node after a specified delay.
 rice.pastry.ScheduledMessage scheduleMsg(rice.pastry.messaging.Message msg, long delay, long period)
          Schedule the specified message for repeated fixed-delay delivery to the local node, beginning after the specified delay.
 rice.pastry.ScheduledMessage scheduleMsgAtFixedRate(rice.pastry.messaging.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()
           
 
Methods inherited from class rice.pastry.PastryNode
addLeafSetObserver, addRouteSetObserver, deleteLeafSetObserver, deleteRouteSetObserver, getId, getIdFactory, getLeafSet, getLocalHandle, getMessageDispatch, getNodeId, getRoutingTable, isClosest, isReady, 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
 

Constructor Detail

DirectPastryNode

public DirectPastryNode(rice.pastry.NodeId id,
                        rice.pastry.direct.NetworkSimulator sim)
Method Detail

setDirectElements

public void setDirectElements()

doneNode

public void doneNode(rice.pastry.NodeHandle bootstrap)

initiateJoin

public final void initiateJoin(rice.pastry.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 rice.pastry.ScheduledMessage scheduleMsg(rice.pastry.messaging.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 rice.pastry.ScheduledMessage scheduleMsg(rice.pastry.messaging.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 rice.pastry.ScheduledMessage scheduleMsgAtFixedRate(rice.pastry.messaging.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

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection