|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.PastryNodeFactory
rice.pastry.transport.TransportPastryNodeFactory
public class TransportPastryNodeFactory
Field Summary | |
---|---|
protected int |
findFireWallPolicy
|
static byte[] |
PASTRY_MAGIC_NUMBER
|
protected int |
testFireWallPolicy
|
Fields inherited from class rice.pastry.PastryNodeFactory |
---|
environment, logger, lSetSize, pingCache, rtBase, rtMax |
Constructor Summary | |
---|---|
TransportPastryNodeFactory(NodeIdFactory nf,
java.net.InetAddress bindAddress,
int startPort,
Environment env,
NATHandler handler)
Constructor. |
|
TransportPastryNodeFactory(NodeIdFactory nf,
int startPort,
Environment env)
|
Method Summary | |
---|---|
LeafSet |
getLeafSet(NodeHandle handle)
This method returns the remote leafset of the provided handle to the caller, in a protocol-dependent fashion. |
CancellableTask |
getLeafSet(NodeHandle handle,
Continuation c)
Non-blocking version. |
int |
getProximity(NodeHandle local,
NodeHandle handle)
This method determines and returns the proximity of the current local node the provided NodeHandle. |
RouteSet[] |
getRouteRow(NodeHandle handle,
int row)
This method returns the remote route row of the provided handle to the caller, in a protocol-dependent fashion. |
CancellableTask |
getRouteRow(NodeHandle handle,
int row,
Continuation c)
Non-blocking version. |
PastryNode |
newNode(Id id)
|
PastryNode |
newNode(Id nodeId,
java.net.InetSocketAddress pAddress)
Method which creates a Pastry node from the next port with the specified nodeId (or one generated from the NodeIdFactory if not specified) |
PastryNode |
newNode(Id nodeId,
java.net.InetSocketAddress pAddress,
boolean throwException)
|
PastryNode |
newNode(NodeHandle bootstrap)
Method which creates a Pastry node from the next port with a randomly generated NodeId. |
PastryNode |
newNode(NodeHandle bootstrap,
Id nodeId)
Call this to construct a new node of the type chosen by the factory, with the given nodeId. |
PastryNode |
newNode(NodeHandle bootstrap,
Id nodeId,
java.net.InetSocketAddress proxy)
Method which creates a Pastry node from the next port with the specified nodeId (or one generated from the NodeIdFactory if not specified) |
PastryNode |
newNode(NodeHandle bootstrap,
java.net.InetSocketAddress proxy)
Method which creates a Pastry node from the next port with the specified nodeId (or one generated from the NodeIdFactory if not specified) |
Methods inherited from class rice.pastry.PastryNodeFactory |
---|
getEnvironment, getNearest, newNode, proximity, sortedProximityCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] PASTRY_MAGIC_NUMBER
protected int testFireWallPolicy
protected int findFireWallPolicy
Constructor Detail |
---|
public TransportPastryNodeFactory(NodeIdFactory nf, java.net.InetAddress bindAddress, int startPort, Environment env, NATHandler handler) throws java.io.IOException
nf
- The factory for building node idsbindAddress
- which address to bind tostartPort
- The port to start creating nodes onenv
- The environment.
java.io.IOException
public TransportPastryNodeFactory(NodeIdFactory nf, int startPort, Environment env) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public PastryNode newNode(NodeHandle bootstrap)
newNode
in class PastryNodeFactory
bootstrap
- Node handle to bootstrap from.
public PastryNode newNode(NodeHandle bootstrap, Id nodeId, java.net.InetSocketAddress proxy)
bootstrap
- Node handle to bootstrap from.nodeId
- if non-null, will use this nodeId for the node, rather than using the NodeIdFactory
public PastryNode newNode(NodeHandle bootstrap, java.net.InetSocketAddress proxy)
bootstrap
- Node handle to bootstrap from.
public PastryNode newNode(NodeHandle bootstrap, Id nodeId)
PastryNodeFactory
newNode
in class PastryNodeFactory
bootstrap
- The node handle to bootstrap off ofnodeId
- The nodeId of the new nodepublic PastryNode newNode(Id nodeId, java.net.InetSocketAddress pAddress)
bootstrap
- Node handle to bootstrap from.nodeId
- if non-null, will use this nodeId for the node, rather than using the NodeIdFactorypAddress
- The address to claim that this node is at - used for proxies
behind NATs
public PastryNode newNode(Id id) throws java.io.IOException
newNode
in class PastryNodeFactory
java.io.IOException
public PastryNode newNode(Id nodeId, java.net.InetSocketAddress pAddress, boolean throwException) throws java.io.IOException
java.io.IOException
public LeafSet getLeafSet(NodeHandle handle) throws java.io.IOException
PastryNodeFactory
getLeafSet
in class PastryNodeFactory
handle
- The node to connect to
java.io.IOException
public CancellableTask getLeafSet(NodeHandle handle, Continuation c)
PastryNodeFactory
getLeafSet
in class PastryNodeFactory
public int getProximity(NodeHandle local, NodeHandle handle)
PastryNodeFactory
getProximity
in class PastryNodeFactory
handle
- The handle to determine the proximity of
public RouteSet[] getRouteRow(NodeHandle handle, int row) throws java.io.IOException
PastryNodeFactory
getRouteRow
in class PastryNodeFactory
handle
- The node to connect torow
- The row number to retrieve
java.io.IOException
public CancellableTask getRouteRow(NodeHandle handle, int row, Continuation c)
PastryNodeFactory
getRouteRow
in class PastryNodeFactory
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |