|
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.dist.DistPastryNode
public abstract class DistPastryNode
Class which represents the abstraction of a "real" pastry node. Designed to be extended by the protocol implementation (i.e. RMI or Socket) desired.
Field Summary | |
---|---|
protected int |
leafSetMaintFreq
|
protected ScheduledMessage |
leafSetRoutineMaintenance
|
protected int |
routeSetMaintFreq
|
protected ScheduledMessage |
routeSetRoutineMaintenance
|
protected Timer |
timer
|
Fields inherited from class rice.pastry.PastryNode |
---|
apps, localhandle, logger, myNodeId |
Constructor Summary | |
---|---|
protected |
DistPastryNode(NodeId id,
Environment e)
Constructor, with NodeId. |
Method Summary | |
---|---|
void |
addNetworkListener(NetworkListener listener)
|
void |
broadcastChannelClosed(java.net.InetSocketAddress addr)
|
void |
broadcastChannelOpened(java.net.InetSocketAddress addr,
int reason)
|
void |
broadcastReceivedListeners(java.lang.Object message,
java.net.InetSocketAddress from,
int size,
int type)
|
void |
broadcastSentListeners(java.lang.Object message,
java.net.InetSocketAddress dest,
int size,
int type)
|
void |
destroy()
Method which kills a PastryNode (used only for testing). |
void |
doneNode(NodeHandle bootstrap)
Called after the node is initialized. |
protected NetworkListener[] |
getNetworkListeners()
|
Timer |
getTimer()
|
void |
initiateJoin(NodeHandle bootstrap)
Sends an InitiateJoin message to itself. |
void |
nodeIsReady()
Called from PastryNode when the join succeeds. |
void |
process(Executable task,
Continuation command)
Schedules a job for processing on the dedicated processing thread. |
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. |
ExponentialBackoffScheduledMessage |
scheduleMsgExpBackoff(Message msg,
long delay,
long initialPeriod,
double expBase)
|
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 int leafSetMaintFreq
protected int routeSetMaintFreq
protected Timer timer
protected ScheduledMessage leafSetRoutineMaintenance
protected ScheduledMessage routeSetRoutineMaintenance
Constructor Detail |
---|
protected DistPastryNode(NodeId id, Environment e)
id
- DESCRIBE THE PARAMETERMethod Detail |
---|
public Timer getTimer()
public void addNetworkListener(NetworkListener listener)
protected NetworkListener[] getNetworkListeners()
public void broadcastChannelClosed(java.net.InetSocketAddress addr)
public void broadcastChannelOpened(java.net.InetSocketAddress addr, int reason)
public void broadcastSentListeners(java.lang.Object message, java.net.InetSocketAddress dest, int size, int type)
public void broadcastReceivedListeners(java.lang.Object message, java.net.InetSocketAddress from, int size, int type)
public final void initiateJoin(NodeHandle bootstrap)
initiateJoin
in class PastryNode
bootstrap
- Node handle to bootstrap with.public void nodeIsReady()
nodeIsReady
in class PastryNode
public void doneNode(NodeHandle bootstrap)
bootstrap
- DESCRIBE THE PARAMETERpublic void destroy()
destroy
in interface Destructable
destroy
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 ExponentialBackoffScheduledMessage scheduleMsgExpBackoff(Message msg, long delay, long initialPeriod, double expBase)
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 void process(Executable task, Continuation command)
process
in class PastryNode
task
- The task to run on the processing threadcommand
- The command to return the result to once it's done
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |