|
ePOST 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 boolean |
alive
|
static DirectPastryNode |
currentNode
Used for proximity calculation of DirectNodeHandle. |
protected Timer |
timer
|
Fields inherited from class rice.pastry.PastryNode |
---|
apps, localhandle, logger, myNodeId |
Constructor Summary | |
---|---|
DirectPastryNode(NodeId id,
NetworkSimulator sim,
Environment e,
NodeRecord nr)
|
Method Summary | |
---|---|
NodeHandle |
coalesce(NodeHandle newHandle)
|
void |
destroy()
Method which kills a PastryNode. |
void |
doneNode(NodeHandle bootstrap)
|
Logger |
getLogger()
|
void |
initiateJoin(NodeHandle bootstrap)
Overridden by derived classes to initiate the join process |
void |
initiateJoin(NodeHandle[] bootstrap)
Sends an InitiateJoin message to itself. |
boolean |
isAlive()
|
void |
nodeIsReady()
Called from PastryNode after the join succeeds. |
void |
receiveMessage(Message msg)
message receiver interface. |
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)
|
void |
setDirectElements()
|
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 |
---|
public static DirectPastryNode currentNode
protected boolean alive
protected Timer timer
Constructor Detail |
---|
public DirectPastryNode(NodeId id, NetworkSimulator sim, Environment e, NodeRecord nr)
Method Detail |
---|
public void setDirectElements()
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 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
public void receiveMessage(Message msg)
PastryNode
receiveMessage
in interface MessageReceiver
receiveMessage
in class PastryNode
msg
- the message.public Logger getLogger()
public void send(NodeHandle handle, Message message)
send
in class PastryNode
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |