Rice Pastry API

rice.pastry.transport
Class TransportPastryNodeFactory

java.lang.Object
  extended by rice.pastry.PastryNodeFactory
      extended by rice.pastry.transport.TransportPastryNodeFactory
Direct Known Subclasses:
DirectPastryNodeFactory, SocketPastryNodeFactory

public abstract class TransportPastryNodeFactory
extends PastryNodeFactory


Field Summary
protected  int leafSetMaintFreq
          Large period (in seconds) means infrequent, 0 means never.
protected  int routeSetMaintFreq
           
 
Fields inherited from class rice.pastry.PastryNodeFactory
environment, logger, lSetSize, rtBase, rtMax
 
Constructor Summary
TransportPastryNodeFactory(Environment env)
          Constructor.
 
Method Summary
protected abstract  Bootstrapper getBootstrapper(PastryNode pn, NodeHandleAdapter tl, NodeHandleFactory handleFactory, ProximityNeighborSelector pns)
           
protected  JoinProtocol getJoinProtocol(PastryNode pn, LeafSet leafSet, RoutingTable routeTable, ReadyStrategy lsProtocol)
           
protected  LeafSetProtocol getLeafSetProtocol(PastryNode pn, LeafSet leafSet, RoutingTable routeTable)
           
protected abstract  NodeHandle getLocalHandle(PastryNode pn, NodeHandleFactory handleFactory)
           
protected abstract  NodeHandleAdapter getNodeHandleAdapter(PastryNode pn, NodeHandleFactory handleFactory, TLDeserializer deserializer)
           
protected abstract  NodeHandleFactory getNodeHandleFactory(PastryNode pn)
           
protected  ProximityNeighborSelector getProximityNeighborSelector(PastryNode pn)
          Can be overridden.
protected  RouterStrategy getRouterStrategy(PastryNode pn)
           
protected  RouteSetProtocol getRouteSetProtocol(PastryNode pn, LeafSet leafSet, RoutingTable routeTable)
           
protected  TLDeserializer getTLDeserializer(NodeHandleFactory handleFactory, PastryNode pn)
           
 PastryNode nodeHandleHelper(PastryNode pn)
           
protected  void registerApps(PastryNode pn, LeafSet leafSet, RoutingTable routeTable, NodeHandleAdapter nha, NodeHandleFactory handleFactory)
           
 
Methods inherited from class rice.pastry.PastryNodeFactory
getEnvironment, newNode, newNode, newNode, newNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leafSetMaintFreq

protected int leafSetMaintFreq
Large period (in seconds) means infrequent, 0 means never.


routeSetMaintFreq

protected int routeSetMaintFreq
Constructor Detail

TransportPastryNodeFactory

public TransportPastryNodeFactory(Environment env)
Constructor. Here is order for bind address 1) bindAddress parameter 2) if bindAddress is null, then parameter: socket_bindAddress (if it exists) 3) if socket_bindAddress doesn't exist, then InetAddress.getLocalHost()

Parameters:
nf - The factory for building node ids
bindAddress - which address to bind to
startPort - The port to start creating nodes on
env - The environment.
Method Detail

nodeHandleHelper

public PastryNode nodeHandleHelper(PastryNode pn)
                            throws java.io.IOException
Throws:
java.io.IOException

getRouterStrategy

protected RouterStrategy getRouterStrategy(PastryNode pn)

registerApps

protected void registerApps(PastryNode pn,
                            LeafSet leafSet,
                            RoutingTable routeTable,
                            NodeHandleAdapter nha,
                            NodeHandleFactory handleFactory)

getRouteSetProtocol

protected RouteSetProtocol getRouteSetProtocol(PastryNode pn,
                                               LeafSet leafSet,
                                               RoutingTable routeTable)

getLeafSetProtocol

protected LeafSetProtocol getLeafSetProtocol(PastryNode pn,
                                             LeafSet leafSet,
                                             RoutingTable routeTable)

getJoinProtocol

protected JoinProtocol getJoinProtocol(PastryNode pn,
                                       LeafSet leafSet,
                                       RoutingTable routeTable,
                                       ReadyStrategy lsProtocol)

getTLDeserializer

protected TLDeserializer getTLDeserializer(NodeHandleFactory handleFactory,
                                           PastryNode pn)

getProximityNeighborSelector

protected ProximityNeighborSelector getProximityNeighborSelector(PastryNode pn)
Can be overridden.

Parameters:
pn -
Returns:

getLocalHandle

protected abstract NodeHandle getLocalHandle(PastryNode pn,
                                             NodeHandleFactory handleFactory)
                                      throws java.io.IOException
Throws:
java.io.IOException

getNodeHandleAdapter

protected abstract NodeHandleAdapter getNodeHandleAdapter(PastryNode pn,
                                                          NodeHandleFactory handleFactory,
                                                          TLDeserializer deserializer)
                                                   throws java.io.IOException
Throws:
java.io.IOException

getNodeHandleFactory

protected abstract NodeHandleFactory getNodeHandleFactory(PastryNode pn)
                                                   throws java.io.IOException
Throws:
java.io.IOException

getBootstrapper

protected abstract Bootstrapper getBootstrapper(PastryNode pn,
                                                NodeHandleAdapter tl,
                                                NodeHandleFactory handleFactory,
                                                ProximityNeighborSelector pns)

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection