|
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.dist.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
DESCRIBE THE FIELD |
protected ScheduledMessage |
leafSetRoutineMaintenance
DESCRIBE THE FIELD |
protected int |
routeSetMaintFreq
DESCRIBE THE FIELD |
protected ScheduledMessage |
routeSetRoutineMaintenance
DESCRIBE THE FIELD |
protected Timer |
timer
DESCRIBE THE FIELD |
Fields inherited from class rice.pastry.PastryNode |
apps, localhandle, logger, myNodeId |
Constructor Summary | |
protected |
DistPastryNode(Id id,
Environment e)
Constructor, with NodeId. |
Method Summary | |
void |
addNetworkListener(NetworkListener listener)
Adds a feature to the NetworkListener attribute of the DistPastryNode object |
void |
broadcastChannelClosed(java.net.InetSocketAddress addr)
DESCRIBE THE METHOD |
void |
broadcastChannelOpened(java.net.InetSocketAddress addr,
int reason)
DESCRIBE THE METHOD |
void |
broadcastReceivedListeners(java.lang.Object message,
java.net.InetSocketAddress from,
int size,
int type)
DESCRIBE THE METHOD |
void |
broadcastSentListeners(java.lang.Object message,
java.net.InetSocketAddress dest,
int size,
int type)
DESCRIBE THE METHOD |
void |
destroy()
Method which kills a PastryNode (used only for testing). |
void |
doneNode(NodeHandle bootstrap)
Called after the node is initialized. |
protected NetworkListener[] |
getNetworkListeners()
Gets the NetworkListeners attribute of the DistPastryNode object |
Timer |
getTimer()
Gets the Timer attribute of the DistPastryNode object |
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)
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 |
Methods inherited from interface rice.pastry.NodeHandleFactory |
readNodeHandle |
Field Detail |
protected int leafSetMaintFreq
protected int routeSetMaintFreq
protected Timer timer
protected ScheduledMessage leafSetRoutineMaintenance
protected ScheduledMessage routeSetRoutineMaintenance
Constructor Detail |
protected DistPastryNode(Id id, Environment e)
id
- DESCRIBE THE PARAMETERe
- DESCRIBE THE PARAMETERMethod Detail |
public Timer getTimer()
protected NetworkListener[] getNetworkListeners()
public void addNetworkListener(NetworkListener listener)
listener
- The feature to be added to the NetworkListener attributepublic void broadcastChannelClosed(java.net.InetSocketAddress addr)
addr
- DESCRIBE THE PARAMETERpublic void broadcastChannelOpened(java.net.InetSocketAddress addr, int reason)
addr
- DESCRIBE THE PARAMETERreason
- DESCRIBE THE PARAMETERpublic void broadcastSentListeners(java.lang.Object message, java.net.InetSocketAddress dest, int size, int type)
message
- DESCRIBE THE PARAMETERdest
- DESCRIBE THE PARAMETERsize
- DESCRIBE THE PARAMETERtype
- DESCRIBE THE PARAMETERpublic void broadcastReceivedListeners(java.lang.Object message, java.net.InetSocketAddress from, int size, int type)
message
- DESCRIBE THE PARAMETERfrom
- DESCRIBE THE PARAMETERsize
- DESCRIBE THE PARAMETERtype
- DESCRIBE THE PARAMETERpublic 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)
msg
- DESCRIBE THE PARAMETERdelay
- DESCRIBE THE PARAMETERinitialPeriod
- DESCRIBE THE PARAMETERexpBase
- DESCRIBE THE PARAMETER
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
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |