rice.pastry.socket
Class SocketPastryNode
java.lang.Object
|
+--rice.pastry.PastryNode
|
+--rice.pastry.dist.DistPastryNode
|
+--rice.pastry.socket.SocketPastryNode
- All Implemented Interfaces:
- rice.pastry.messaging.MessageReceiver, rice.p2p.commonapi.Node
- public class SocketPastryNode
- extends rice.pastry.dist.DistPastryNode
A direct mimic of WirePastryNode class.
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.
- Version:
- $Id: SocketPastryNode.java,v 1.2 2003/09/22 19:53:06 glchen Exp $
- Author:
- Guanling Chen, Alan Mislove
Fields inherited from class rice.pastry.dist.DistPastryNode |
leafSetMaintFreq, routeSetMaintFreq |
Fields inherited from class rice.pastry.PastryNode |
apps, localhandle, myNodeId |
Methods inherited from class rice.pastry.dist.DistPastryNode |
initiateJoin, scheduleMsg, scheduleMsg, scheduleMsgAtFixedRate |
Methods inherited from class rice.pastry.PastryNode |
addLeafSetObserver, addRouteSetObserver, deleteLeafSetObserver, deleteRouteSetObserver, 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 |
_transport
protected Transport _transport
_address
private java.net.InetSocketAddress _address
_pool
private SocketNodeHandlePool _pool
_executionThread
private java.lang.Thread _executionThread
SocketPastryNode
public SocketPastryNode(rice.pastry.NodeId id)
setSocketElements
public void setSocketElements(java.net.InetSocketAddress address,
Transport transport,
SocketNodeHandlePool pool,
int lsmf,
int rsmf)
getTransport
public Transport getTransport()
setThread
public void setThread(java.lang.Thread t)
inThread
public boolean inThread()
doneNode
public void doneNode(rice.pastry.NodeHandle bootstrap)
- Overrides:
doneNode
in class rice.pastry.dist.DistPastryNode
getNodeHandlePool
public rice.pastry.dist.DistNodeHandlePool getNodeHandlePool()
- Specified by:
getNodeHandlePool
in class rice.pastry.dist.DistPastryNode
nodeIsReady
public void nodeIsReady()
- Overrides:
nodeIsReady
in class rice.pastry.dist.DistPastryNode
kill
public void kill()
- Overrides:
kill
in class rice.pastry.dist.DistPastryNode