|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable rice.pastry.PastryNode rice.pastry.direct.DirectPastryNode
public class DirectPastryNode
Direct pastry node. Subclasses PastryNode, and does about nothing else.
Field Summary | |
---|---|
protected Timer |
timer
|
Fields inherited from class rice.pastry.PastryNode |
---|
apps, joinFailed, joinFailedReason, leafSet, localhandle, logger, myNodeId, routeSet |
Constructor Summary | |
---|---|
DirectPastryNode(Id id,
NetworkSimulator sim,
Environment e,
NodeRecord nr)
|
Method Summary | |
---|---|
NodeHandle |
coalesce(NodeHandle newHandle)
|
void |
connect(NodeHandle remoteNode,
AppSocketReceiver receiver,
PastryAppl appl,
int timeout)
Called by PastryAppl to ask the transport layer to open a Socket to its counterpart on another node. |
void |
destroy()
Method which kills a PastryNode. |
void |
doneNode(NodeHandle[] bootstrap)
|
static DirectPastryNode |
getCurrentNode()
|
Logger |
getLogger()
|
void |
initiateJoin(NodeHandle[] bootstrap)
Overridden by derived classes to initiate the join process |
boolean |
isAlive()
|
void |
nodeIsReady()
Called from PastryNode after the join succeeds. |
int |
proximity(NodeHandle that)
The proximity of the node handle. |
NodeHandle |
readNodeHandle(InputBuffer buf)
|
void |
receiveMessage(Message msg)
message receiver interface. |
void |
route(RouteMessage rm)
|
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 |
send(NodeHandle nh,
Message m)
Deliver message to the NodeHandle. |
static DirectPastryNode |
setCurrentNode(DirectPastryNode dpn)
Returns the previous one. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Timer timer
Constructor Detail |
---|
public DirectPastryNode(Id id, NetworkSimulator sim, Environment e, NodeRecord nr)
Method Detail |
---|
public static DirectPastryNode setCurrentNode(DirectPastryNode dpn)
dnh
-
public static DirectPastryNode getCurrentNode()
public void doneNode(NodeHandle[] bootstrap)
public boolean isAlive()
public void destroy()
PastryNode
destroy
in interface Destructable
destroy
in class PastryNode
public final void initiateJoin(NodeHandle[] bootstrap)
PastryNode
initiateJoin
in class PastryNode
bootstrap
- Node handle to bootstrap with.public final void nodeIsReady()
nodeIsReady
in class PastryNode
public ScheduledMessage scheduleMsg(Message msg, long delay)
scheduleMsg
in class PastryNode
msg
- a message that will be delivered to the local node after the
specified delaydelay
- time in milliseconds before message is to be delivered
public ScheduledMessage scheduleMsg(Message msg, long delay, long period)
scheduleMsg
in class PastryNode
msg
- a message that will be delivered to the local node after the
specified delaydelay
- time in milliseconds before message is to be deliveredperiod
- time in milliseconds between successive message deliveries
public ScheduledMessage scheduleMsgAtFixedRate(Message msg, long delay, long period)
scheduleMsgAtFixedRate
in class PastryNode
msg
- a message that will be delivered to the local node after the
specified delaydelay
- time in milliseconds before message is to be deliveredperiod
- time in milliseconds between successive message deliveries
public NodeHandle coalesce(NodeHandle newHandle)
coalesce
in class PastryNode
public void receiveMessage(Message msg)
PastryNode
receiveMessage
in class PastryNode
public void route(RouteMessage rm)
public Logger getLogger()
public int proximity(NodeHandle that)
PastryNode
proximity
in class PastryNode
public void send(NodeHandle nh, Message m)
PastryNode
send
in class PastryNode
public void connect(NodeHandle remoteNode, AppSocketReceiver receiver, PastryAppl appl, int timeout)
PastryNode
connect
in class PastryNode
public NodeHandle readNodeHandle(InputBuffer buf)
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |