|
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 rice.pastry.socket.SocketPastryNode
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, leafSetRoutineMaintenance, routeSetMaintFreq, routeSetRoutineMaintenance, timer |
Fields inherited from class rice.pastry.PastryNode |
apps, localhandle, logger, myNodeId |
Constructor Summary | |
SocketPastryNode(Id id,
Environment e)
Constructor |
Method Summary | |
void |
acceptAppSocket(rice.pastry.socket.SocketAppSocket socket,
int appId)
DESCRIBE THE METHOD |
NodeHandle |
coalesce(NodeHandle newHandle)
DESCRIBE THE METHOD |
void |
connect(NodeHandle handle,
AppSocketReceiver receiver,
PastryAppl appl,
int timeout)
DESCRIBE THE METHOD |
void |
destroy()
Makes this node resign from the network. |
void |
doneNode(NodeHandle bootstrap)
Called after the node is initialized. |
SocketSourceRouteManager |
getSocketSourceRouteManager()
Returns the SocketSourceRouteManager for this pastry node. |
NodeHandle |
readNodeHandle(InputBuffer buf)
DESCRIBE THE METHOD |
void |
send(NodeHandle handle,
Message message)
DESCRIBE THE METHOD |
void |
setSocketElements(EpochInetSocketAddress address,
int lsmf,
int rsmf)
Helper method which allows the WirePastryNodeFactory to initialize a number of the pastry node's elements. |
void |
setSocketSourceRouteManager(SocketSourceRouteManager srManager)
Sets the SocketSourceRouteManager attribute of the SocketPastryNode object |
java.lang.String |
toString()
Prints out a String representation of this node |
Methods inherited from class rice.pastry.dist.DistPastryNode |
addNetworkListener, broadcastChannelClosed, broadcastChannelOpened, broadcastReceivedListeners, broadcastSentListeners, getNetworkListeners, getTimer, initiateJoin, nodeIsReady, process, scheduleMsg, scheduleMsg, scheduleMsgAtFixedRate, scheduleMsgExpBackoff |
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 |
Constructor Detail |
public SocketPastryNode(Id id, Environment e)
id
- The NodeId of this Pastry node.e
- DESCRIBE THE PARAMETERMethod Detail |
public SocketSourceRouteManager getSocketSourceRouteManager()
public void setSocketElements(EpochInetSocketAddress address, int lsmf, int rsmf)
address
- The address of this pastry node.lsmf
- Leaf set maintenance frequency. 0 means never.rsmf
- Route set maintenance frequency. 0 means never.public void setSocketSourceRouteManager(SocketSourceRouteManager srManager)
srManager
- The new SocketSourceRouteManager valuepublic void doneNode(NodeHandle bootstrap)
doneNode
in class DistPastryNode
bootstrap
- The node which this node should boot off of.public java.lang.String toString()
toString
in class PastryNode
public void destroy()
destroy
in interface Destructable
destroy
in class DistPastryNode
public NodeHandle coalesce(NodeHandle newHandle)
coalesce
in class PastryNode
newHandle
- DESCRIBE THE PARAMETER
public void send(NodeHandle handle, Message message)
send
in class PastryNode
handle
- DESCRIBE THE PARAMETERmessage
- DESCRIBE THE PARAMETERpublic void connect(NodeHandle handle, AppSocketReceiver receiver, PastryAppl appl, int timeout)
connect
in class PastryNode
handle
- DESCRIBE THE PARAMETERreceiver
- DESCRIBE THE PARAMETERappl
- DESCRIBE THE PARAMETERtimeout
- DESCRIBE THE PARAMETERpublic void acceptAppSocket(rice.pastry.socket.SocketAppSocket socket, int appId) throws AppSocketException
socket
- DESCRIBE THE PARAMETERappId
- DESCRIBE THE PARAMETER
AppSocketException
- DESCRIBE THE EXCEPTIONpublic NodeHandle readNodeHandle(InputBuffer buf) throws java.io.IOException
buf
- DESCRIBE THE PARAMETER
java.io.IOException
- DESCRIBE THE EXCEPTION
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |