|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.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.
| Nested Class Summary | |
static class |
DistPastryNode.ProcessingQueue
DESCRIBE THE CLASS |
static class |
DistPastryNode.ProcessingQueueOverflowException
DESCRIBE THE CLASS |
| Field Summary | |
protected int |
leafSetMaintFreq
DESCRIBE THE FIELD |
protected ScheduledMessage |
leafSetRoutineMaintenance
DESCRIBE THE FIELD |
static DistPastryNode.ProcessingQueue |
QUEUE
DESCRIBE THE FIELD |
protected int |
routeSetMaintFreq
DESCRIBE THE FIELD |
protected ScheduledMessage |
routeSetRoutineMaintenance
DESCRIBE THE FIELD |
static rice.pastry.dist.DistPastryNode.ProcessingThread |
THREAD
DESCRIBE THE FIELD |
protected static Timer |
timer
DESCRIBE THE FIELD |
static boolean |
verbose
DESCRIBE THE FIELD |
| Fields inherited from class rice.pastry.PastryNode |
apps, EC_NO_CODE_AVAILABLE, localhandle, myNodeId, nodeHandleSet |
| Constructor Summary | |
protected |
DistPastryNode(NodeId id)
Constructor, with NodeId. |
| Method Summary | |
static void |
addError(java.lang.String error)
Adds a feature to the Error attribute of the DistPastryNode class |
void |
addNetworkListener(NetworkListener listener)
Adds a feature to the NetworkListener attribute of the DistPastryNode object |
void |
broadcastReceivedListeners(java.lang.Object message,
java.net.InetSocketAddress[] path,
int size)
DESCRIBE THE METHOD |
void |
broadcastSentListeners(java.lang.Object message,
java.net.InetSocketAddress[] path,
int size)
DESCRIBE THE METHOD |
void |
doneNode(NodeHandle bootstrap)
Called after the node is initialized. |
static java.lang.String[] |
getErrors()
Gets the Errors attribute of the DistPastryNode class |
protected NetworkListener[] |
getNetworkListeners()
Gets the NetworkListeners attribute of the DistPastryNode object |
abstract DistNodeHandlePool |
getNodeHandlePool()
Method which returns the Dist for this Pastry node. |
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. |
void |
resign()
Method which kills a PastryNode (used only for testing). |
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 |
| Field Detail |
protected int leafSetMaintFreq
protected int routeSetMaintFreq
protected ScheduledMessage leafSetRoutineMaintenance
protected ScheduledMessage routeSetRoutineMaintenance
public static final boolean verbose
public static DistPastryNode.ProcessingQueue QUEUE
public static rice.pastry.dist.DistPastryNode.ProcessingThread THREAD
protected static final Timer timer
| Constructor Detail |
protected DistPastryNode(NodeId id)
id - DESCRIBE THE PARAMETER| Method Detail |
public Timer getTimer()
protected NetworkListener[] getNetworkListeners()
public abstract DistNodeHandlePool getNodeHandlePool()
public void addNetworkListener(NetworkListener listener)
listener - The feature to be added to the NetworkListener attribute
public void broadcastSentListeners(java.lang.Object message,
java.net.InetSocketAddress[] path,
int size)
message - DESCRIBE THE PARAMETERpath - DESCRIBE THE PARAMETERsize - DESCRIBE THE PARAMETER
public void broadcastReceivedListeners(java.lang.Object message,
java.net.InetSocketAddress[] path,
int size)
message - DESCRIBE THE PARAMETERpath - DESCRIBE THE PARAMETERsize - DESCRIBE THE PARAMETERpublic final void initiateJoin(NodeHandle bootstrap)
initiateJoin in class PastryNodebootstrap - Node handle to bootstrap with.public void nodeIsReady()
nodeIsReady in class PastryNodepublic void doneNode(NodeHandle bootstrap)
bootstrap - DESCRIBE THE PARAMETERpublic void resign()
resign in class PastryNode
public ScheduledMessage scheduleMsg(Message msg,
long delay)
scheduleMsg in class PastryNodemsg - 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 PastryNodemsg - 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 PastryNodemsg - 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 PastryNodetask - The task to run on the processing threadcommand - The command to return the result to once it's donepublic static java.lang.String[] getErrors()
public static void addError(java.lang.String error)
error - The feature to be added to the Error attribute
|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||