|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.PastryNode | +--rice.pastry.dist.DistPastryNode | +--rice.pastry.wire.WirePastryNode
An Socket-based Pastry node, which has two threads - one thread for performing route set and leaf set maintainance, and another thread for listening on the sockets and performing all non-blocking I/O.
Field Summary |
Fields inherited from class rice.pastry.dist.DistPastryNode |
leafSetMaintFreq, routeSetMaintFreq |
Fields inherited from class rice.pastry.PastryNode |
apps, localhandle, myNodeId |
Constructor Summary | |
WirePastryNode(rice.pastry.NodeId id)
Constructor |
Method Summary | |
void |
doneNode(rice.pastry.NodeHandle bootstrap)
Called after the node is initialized. |
rice.pastry.wire.DatagramManager |
getDatagramManager()
Returns the DatagramManager for this pastry node. |
rice.pastry.dist.DistNodeHandlePool |
getNodeHandlePool()
Returns the WireNodeHandlePool for this pastry node. |
rice.pastry.wire.SelectorManager |
getSelectorManager()
Returns the SelectorManager for this pastry node. |
rice.pastry.wire.SocketManager |
getSocketManager()
Returns the SocketManager for this pastry node. |
boolean |
inThread()
Checks whether the current thread is the execution thread. |
void |
kill()
Method for simulating the death of this node. |
void |
nodeIsReady()
Called from PastryNode when the join succeeds. |
void |
setSocketElements(java.net.InetSocketAddress address,
rice.pastry.wire.SelectorManager manager,
rice.pastry.wire.DatagramManager dManager,
rice.pastry.wire.SocketManager sManager,
rice.pastry.wire.WireNodeHandlePool pool,
int lsmf,
int rsmf)
Helper method which allows the WirePastryNodeFactory to initialize a number of the pastry node's elements. |
void |
setThread(java.lang.Thread t)
Sets the thread which the pastry node is running in. |
Methods inherited from class rice.pastry.dist.DistPastryNode |
initiateJoin, scheduleMsg, scheduleMsg, scheduleMsgAtFixedRate |
Methods inherited from class rice.pastry.PastryNode |
addLeafSetObserver, addRouteSetObserver, deleteLeafSetObserver, deleteRouteSetObserver, getId, getIdFactory, getLeafSet, getLocalHandle, getMessageDispatch, getNodeId, getRoutingTable, isClosest, isReady, receiveMessage, registerApp, registerApplication, registerReceiver, setElements, setMessageDispatch, setReady, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WirePastryNode(rice.pastry.NodeId id)
id
- The NodeId of this Pastry node.Method Detail |
public void setSocketElements(java.net.InetSocketAddress address, rice.pastry.wire.SelectorManager manager, rice.pastry.wire.DatagramManager dManager, rice.pastry.wire.SocketManager sManager, rice.pastry.wire.WireNodeHandlePool pool, int lsmf, int rsmf)
address
- The address of this pastry node.manager
- The socket manager for this pastry node.pool
- The node handle pool for this pastry node.lsmf
- Leaf set maintenance frequency. 0 means never.rsmf
- Route set maintenance frequency. 0 means never.public void setThread(java.lang.Thread t)
t
- The threadpublic boolean inThread()
public void doneNode(rice.pastry.NodeHandle bootstrap)
doneNode
in class DistPastryNode
bootstrap
- The node which this node should boot off of.public rice.pastry.wire.SelectorManager getSelectorManager()
public rice.pastry.wire.DatagramManager getDatagramManager()
public rice.pastry.wire.SocketManager getSocketManager()
public rice.pastry.dist.DistNodeHandlePool getNodeHandlePool()
getNodeHandlePool
in class DistPastryNode
public void nodeIsReady()
DistPastryNode
nodeIsReady
in class DistPastryNode
public void kill()
kill
in class DistPastryNode
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |