|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.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(NodeId id)
Constructor |
Method Summary | |
void |
doneNode(NodeHandle bootstrap)
Called after the node is initialized. |
DatagramManager |
getDatagramManager()
Returns the DatagramManager for this pastry node. |
DistNodeHandlePool |
getNodeHandlePool()
Returns the WireNodeHandlePool for this pastry node. |
SelectorManager |
getSelectorManager()
Returns the SelectorManager for this pastry node. |
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 when the node is initialized |
void |
setSocketElements(java.net.InetSocketAddress address,
SelectorManager manager,
DatagramManager dManager,
SocketManager sManager,
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(NodeId id)
id
- The NodeId of this Pastry node.Method Detail |
public SelectorManager getSelectorManager()
public DatagramManager getDatagramManager()
public SocketManager getSocketManager()
public DistNodeHandlePool getNodeHandlePool()
getNodeHandlePool
in class DistPastryNode
public void setSocketElements(java.net.InetSocketAddress address, SelectorManager manager, DatagramManager dManager, SocketManager sManager, 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.dManager
- The new SocketElements valuesManager
- The new SocketElements valuepublic void setThread(java.lang.Thread t)
t
- The threadpublic boolean inThread()
public void doneNode(NodeHandle bootstrap)
doneNode
in class DistPastryNode
bootstrap
- The node which this node should boot off of.public void nodeIsReady()
nodeIsReady
in class DistPastryNode
public void kill()
kill
in class DistPastryNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |