|
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
Direct pastry node. Subclasses PastryNode, and does about nothing else.
Field Summary | |
protected boolean |
alive
DESCRIBE THE FIELD |
static DirectPastryNode |
currentNode
Used for proximity calculation of DirectNodeHandle. |
protected Timer |
timer
DESCRIBE THE FIELD |
Fields inherited from class rice.pastry.PastryNode |
apps, localhandle, logger, myNodeId |
Constructor Summary | |
DirectPastryNode(Id id,
NetworkSimulator sim,
Environment e,
NodeRecord nr)
Constructor for DirectPastryNode. |
Method Summary | |
NodeHandle |
coalesce(NodeHandle newHandle)
DESCRIBE THE METHOD |
void |
connect(NodeHandle remoteNode,
AppSocketReceiver receiver,
PastryAppl appl,
int timeout)
DESCRIBE THE METHOD |
void |
destroy()
DESCRIBE THE METHOD |
void |
doneNode(NodeHandle bootstrap)
DESCRIBE THE METHOD |
Logger |
getLogger()
Gets the Logger attribute of the DirectPastryNode object |
void |
initiateJoin(NodeHandle bootstrap)
DESCRIBE THE METHOD |
void |
initiateJoin(NodeHandle[] bootstrap)
Sends an InitiateJoin message to itself. |
boolean |
isAlive()
Gets the Alive attribute of the DirectPastryNode object |
void |
nodeIsReady()
Called from PastryNode after the join succeeds. |
NodeHandle |
readNodeHandle(InputBuffer buf)
DESCRIBE THE METHOD |
void |
receiveMessage(Message msg)
DESCRIBE THE METHOD |
void |
route(RouteMessage rm)
DESCRIBE THE METHOD |
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 handle,
Message message)
DESCRIBE THE METHOD |
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 boolean alive
protected Timer timer
public static DirectPastryNode currentNode
Constructor Detail |
public DirectPastryNode(Id id, NetworkSimulator sim, Environment e, NodeRecord nr)
id
- DESCRIBE THE PARAMETERsim
- DESCRIBE THE PARAMETERe
- DESCRIBE THE PARAMETERnr
- DESCRIBE THE PARAMETERMethod Detail |
public boolean isAlive()
public Logger getLogger()
public void doneNode(NodeHandle bootstrap)
bootstrap
- DESCRIBE THE PARAMETERpublic void destroy()
destroy
in interface Destructable
destroy
in class PastryNode
public final void initiateJoin(NodeHandle bootstrap)
initiateJoin
in class PastryNode
bootstrap
- DESCRIBE THE PARAMETERpublic final void initiateJoin(NodeHandle[] bootstrap)
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
newHandle
- DESCRIBE THE PARAMETER
public void receiveMessage(Message msg)
receiveMessage
in class PastryNode
msg
- DESCRIBE THE PARAMETERpublic void route(RouteMessage rm)
rm
- DESCRIBE THE PARAMETERpublic void send(NodeHandle handle, Message message)
send
in class PastryNode
handle
- DESCRIBE THE PARAMETERmessage
- DESCRIBE THE PARAMETERpublic void connect(NodeHandle remoteNode, AppSocketReceiver receiver, PastryAppl appl, int timeout)
connect
in class PastryNode
remoteNode
- DESCRIBE THE PARAMETERreceiver
- DESCRIBE THE PARAMETERappl
- DESCRIBE THE PARAMETERtimeout
- DESCRIBE THE PARAMETERpublic NodeHandle readNodeHandle(InputBuffer buf)
buf
- DESCRIBE THE PARAMETER
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |