|
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.transport.TransportPastryNodeFactory rice.pastry.direct.DirectPastryNodeFactory
public class DirectPastryNodeFactory
Pastry node factory for direct connections between nodes (local instances).
Field Summary | |
---|---|
protected java.util.Collection<NodeHandleFactoryListener<NodeHandle>> |
listeners
|
protected NodeIdFactory |
nidFactory
|
protected NetworkSimulator |
simulator
|
Fields inherited from class rice.pastry.transport.TransportPastryNodeFactory |
---|
leafSetMaintFreq, routeSetMaintFreq |
Fields inherited from class rice.pastry.PastryNodeFactory |
---|
environment, logger, lSetSize, rtBase, rtMax |
Constructor Summary | |
---|---|
DirectPastryNodeFactory(NodeIdFactory nf,
NetworkSimulator<DirectNodeHandle,RawMessage> sim,
Environment env)
Main constructor. |
Method Summary | |
---|---|
protected Bootstrapper |
getBootstrapper(PastryNode pn,
NodeHandleAdapter tl,
NodeHandleFactory handleFactory,
ProximityNeighborSelector pns)
|
protected TransportLayer<NodeHandle,RawMessage> |
getDirectTransportLayer(PastryNode pn,
NodeRecord nr)
Override me |
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<LeafSet,java.lang.Exception> c)
|
protected LeafSetProtocol |
getLeafSetProtocol(PastryNode pn,
LeafSet leafSet,
RoutingTable routeTable)
|
protected NodeHandle |
getLocalHandle(PastryNode pn,
NodeHandleFactory handleFactory)
|
NetworkSimulator<DirectNodeHandle,RawMessage> |
getNetworkSimulator()
Getter for the NetworkSimulator. |
protected NodeHandleAdapter |
getNodeHandleAdapter(PastryNode pn,
NodeHandleFactory handleFactory,
TLDeserializer deserializer)
|
protected NodeHandleFactory |
getNodeHandleFactory(PastryNode pn)
|
int |
getProximity(NodeHandle local,
NodeHandle remote)
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<RouteSet[],java.lang.Exception> c)
|
PastryNode |
newNode()
|
PastryNode |
newNode(Id nodeId)
Manufacture a new Pastry node. |
PastryNode |
newNode(NodeHandle bootstrap)
Manufacture a new Pastry node. |
PastryNode |
newNode(NodeHandle bootstrap,
Id nodeId)
Call this to construct a new node of the type chosen by the factory, with the given nodeId. |
Methods inherited from class rice.pastry.transport.TransportPastryNodeFactory |
---|
getJoinProtocol, getProximityNeighborSelector, getRouterStrategy, getRouteSetProtocol, getTLDeserializer, nodeHandleHelper, registerApps |
Methods inherited from class rice.pastry.PastryNodeFactory |
---|
getEnvironment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected NodeIdFactory nidFactory
protected NetworkSimulator simulator
protected java.util.Collection<NodeHandleFactoryListener<NodeHandle>> listeners
Constructor Detail |
---|
public DirectPastryNodeFactory(NodeIdFactory nf, NetworkSimulator<DirectNodeHandle,RawMessage> sim, Environment env)
nf
- the NodeIdFactorysim
- the NetworkSimulatore
- the EnviornmentMethod Detail |
---|
protected LeafSetProtocol getLeafSetProtocol(PastryNode pn, LeafSet leafSet, RoutingTable routeTable)
getLeafSetProtocol
in class TransportPastryNodeFactory
public NetworkSimulator<DirectNodeHandle,RawMessage> getNetworkSimulator()
public PastryNode newNode(NodeHandle bootstrap)
newNode
in class PastryNodeFactory
bootstrap
- The node handle to bootstrap off of
public PastryNode newNode() throws java.io.IOException
newNode
in class PastryNodeFactory
java.io.IOException
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) throws java.io.IOException
newNode
in class PastryNodeFactory
java.io.IOException
public LeafSet getLeafSet(NodeHandle handle) throws java.io.IOException
handle
- The node to connect to
java.io.IOException
public CancellableTask getLeafSet(NodeHandle handle, Continuation<LeafSet,java.lang.Exception> c)
public RouteSet[] getRouteRow(NodeHandle handle, int row) throws java.io.IOException
handle
- The node to connect torow
- The row number to retrieve
java.io.IOException
public CancellableTask getRouteRow(NodeHandle handle, int row, Continuation<RouteSet[],java.lang.Exception> c)
public int getProximity(NodeHandle local, NodeHandle remote)
handle
- The handle to determine the proximity of
protected NodeHandle getLocalHandle(PastryNode pn, NodeHandleFactory handleFactory) throws java.io.IOException
getLocalHandle
in class TransportPastryNodeFactory
java.io.IOException
protected NodeHandleFactory getNodeHandleFactory(PastryNode pn) throws java.io.IOException
getNodeHandleFactory
in class TransportPastryNodeFactory
java.io.IOException
protected NodeHandleAdapter getNodeHandleAdapter(PastryNode pn, NodeHandleFactory handleFactory, TLDeserializer deserializer) throws java.io.IOException
getNodeHandleAdapter
in class TransportPastryNodeFactory
java.io.IOException
protected TransportLayer<NodeHandle,RawMessage> getDirectTransportLayer(PastryNode pn, NodeRecord nr)
pn
- nr
-
protected Bootstrapper getBootstrapper(PastryNode pn, NodeHandleAdapter tl, NodeHandleFactory handleFactory, ProximityNeighborSelector pns)
getBootstrapper
in class TransportPastryNodeFactory
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |