|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.PastryNodeFactory | +--rice.pastry.dist.DistPastryNodeFactory
An abstraction of the nodeId factory for distributed nodes. In order to obtain a nodeId factory, a client should use the getFactory method, passing in either PROTOCOL_RMI or PROTOCOL_WIRE as the protocol, and the port number the factory should use. In the wire protocol, the port number is the starting port number that the nodes are constructed on, and in the rmi protocol, the port number is the location of the local RMI registry.
Field Summary | |
static int |
PROTOCOL_RMI
|
static int |
PROTOCOL_WIRE
|
Constructor Summary | |
protected |
DistPastryNodeFactory()
Constructor. |
Method Summary | |
abstract rice.pastry.NodeHandle |
generateNodeHandle(java.net.InetSocketAddress address)
Method which all subclasses should implement allowing the client to generate a node handle given the address of a node. |
static rice.pastry.dist.DistPastryNodeFactory |
getFactory(rice.pastry.NodeIdFactory nf,
int protocol,
int port)
Static method which is designed to be used by clients needing a distrubuted pastry node factory. |
rice.pastry.NodeHandle |
getNodeHandle(java.net.InetSocketAddress address)
Method which a client should use in order to get a bootstrap node from the factory. |
abstract rice.pastry.PastryNode |
newNode(rice.pastry.NodeHandle bootstrap)
Generates a new pastry node with a random NodeId using the bootstrap bootstrap. |
abstract rice.pastry.PastryNode |
newNode(rice.pastry.NodeHandle bootstrap,
rice.pastry.NodeId nodeId)
Generates a new pastry node with the specified NodeId using the bootstrap bootstrap. |
Methods inherited from class rice.pastry.PastryNodeFactory |
getLeafSet, getNearest, getProximity, getRouteRow |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int PROTOCOL_RMI
public static int PROTOCOL_WIRE
Constructor Detail |
protected DistPastryNodeFactory()
Method Detail |
public abstract rice.pastry.NodeHandle generateNodeHandle(java.net.InetSocketAddress address)
public final rice.pastry.NodeHandle getNodeHandle(java.net.InetSocketAddress address)
address
- The address of the remote node.public abstract rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap)
newNode
in class PastryNodeFactory
bootstrap
- Node handle to bootstrap from.public abstract rice.pastry.PastryNode newNode(rice.pastry.NodeHandle bootstrap, rice.pastry.NodeId nodeId)
newNode
in class PastryNodeFactory
bootstrap
- Node handle to bootstrap from.nodeId
- The nodeId of the new nodepublic static rice.pastry.dist.DistPastryNodeFactory getFactory(rice.pastry.NodeIdFactory nf, int protocol, int port)
protocol
- The protocol to use (PROTOCOL_RMI or PROTOCOL_WIRE)port
- The RMI registry port if RMI, or the starting port if wire.
java.lang.IllegalArgumentException
- If protocol is an unsupported port.
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |