net.tomp2p.p2p
Class DistributedRouting

java.lang.Object
  extended by net.tomp2p.p2p.DistributedRouting

public class DistributedRouting
extends Object

Handles routing of nodes to other nodes

Author:
Thomas Bocek

Constructor Summary
DistributedRouting(PeerBean peerBean, NeighborRPC neighbors)
           
 
Method Summary
 FutureRouting bootstrap(Collection<PeerAddress> peerAddresses, int maxNoNewInfo, int maxFailures, int maxSuccess, int parallel, boolean forceTCP, boolean isForceRoutingOnlyToSelf, ChannelCreator cc)
          Bootstraps to the given peerAddresses, i.e.
 FutureRouting bootstrap(Collection<PeerAddress> peerAddresses, int maxNoNewInfo, int maxFailures, int maxSuccess, int parallel, boolean forceSocket, ChannelCreator cc)
          Deprecated. 
 FutureRouting route(Number160 locationKey, Number160 domainKey, Collection<Number160> contentKeys, Message.Command command, int maxDirectHits, int maxNoNewInfo, int maxFailures, int maxSuccess, int parallel, boolean isDigest, boolean forceTCP, ChannelCreator cc)
           
 FutureRouting route(Number160 locationKey, Number160 domainKey, Collection<Number160> contentKeys, Message.Command command, int maxDirectHits, int maxNoNewInfo, int maxFailures, int maxSuccess, int parallel, boolean isDigest, ChannelCreator cc)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedRouting

public DistributedRouting(PeerBean peerBean,
                          NeighborRPC neighbors)
Method Detail

bootstrap

@Deprecated
public FutureRouting bootstrap(Collection<PeerAddress> peerAddresses,
                                          int maxNoNewInfo,
                                          int maxFailures,
                                          int maxSuccess,
                                          int parallel,
                                          boolean forceSocket,
                                          ChannelCreator cc)
Deprecated. 

For backwards compatibility, do not use it

Parameters:
peerAddresses -
maxNoNewInfo -
maxFailures -
maxSuccess -
parallel -
forceSocket -
cc -
Returns:

bootstrap

public FutureRouting bootstrap(Collection<PeerAddress> peerAddresses,
                               int maxNoNewInfo,
                               int maxFailures,
                               int maxSuccess,
                               int parallel,
                               boolean forceTCP,
                               boolean isForceRoutingOnlyToSelf,
                               ChannelCreator cc)
Bootstraps to the given peerAddresses, i.e. looking for near nodes

Parameters:
peerAddresses - the node to which bootstrap should be performed to
maxNoNewInfo - number of nodes asked without new information to stop at
maxFailures - number of failures to stop at
parallel - number of routing requests performed concurrently
Returns:
a FutureRouting object, is set to complete if the route has been found

route

@Deprecated
public FutureRouting route(Number160 locationKey,
                                      Number160 domainKey,
                                      Collection<Number160> contentKeys,
                                      Message.Command command,
                                      int maxDirectHits,
                                      int maxNoNewInfo,
                                      int maxFailures,
                                      int maxSuccess,
                                      int parallel,
                                      boolean isDigest,
                                      ChannelCreator cc)
Deprecated. 

Looks for a route to the given locationKey

Parameters:
locationKey - the node a route should be found to
domainKey - the domain of the network the current node and locationKey is in
contentKeys - keys of the content to search for. Only used if you perform a get
maxDirectHits - number of direct hits to stop at
maxNoNewInfo - number of nodes asked without new information to stop at
maxFailures - number of failures to stop at
parallel - number of routing requests performed concurrently
Returns:
a FutureRouting object, is set to complete if the route has been found

route

public FutureRouting route(Number160 locationKey,
                           Number160 domainKey,
                           Collection<Number160> contentKeys,
                           Message.Command command,
                           int maxDirectHits,
                           int maxNoNewInfo,
                           int maxFailures,
                           int maxSuccess,
                           int parallel,
                           boolean isDigest,
                           boolean forceTCP,
                           ChannelCreator cc)


Copyright © 2012. All Rights Reserved.