Rice Pastry API

org.mpisws.p2p.transport.sourceroute.manager.simple
Class SimpleSourceRouteStrategy<Identifier>

java.lang.Object
  extended by org.mpisws.p2p.transport.sourceroute.manager.simple.SimpleSourceRouteStrategy<Identifier>
All Implemented Interfaces:
SourceRouteStrategy<Identifier>

public class SimpleSourceRouteStrategy<Identifier>
extends java.lang.Object
implements SourceRouteStrategy<Identifier>

This is a simple implementation of the SourceRouteStrategy. It caches routes to destinations but relies on a NextHopeStrategy to provide new nodes that can be used to source route through. If we already source-route to get to them, we simply prepend the route with that one.

Author:
Jeff Hoye

Constructor Summary
SimpleSourceRouteStrategy(Identifier localAddress, SourceRouteFactory<Identifier> srFactory, NextHopStrategy<Identifier> strategy, Environment env)
           
 
Method Summary
 java.util.Collection<SourceRoute<Identifier>> getSourceRoutes(Identifier destination)
          Note, this implementation only allows 1 - hop routes, need to check the liveness, of a route to determine longer routes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSourceRouteStrategy

public SimpleSourceRouteStrategy(Identifier localAddress,
                                 SourceRouteFactory<Identifier> srFactory,
                                 NextHopStrategy<Identifier> strategy,
                                 Environment env)
Method Detail

getSourceRoutes

public java.util.Collection<SourceRoute<Identifier>> getSourceRoutes(Identifier destination)
Note, this implementation only allows 1 - hop routes, need to check the liveness, of a route to determine longer routes. In most cases a 1-hop route should be sufficient.

Specified by:
getSourceRoutes in interface SourceRouteStrategy<Identifier>
Returns:
a collection of paths to the destination. Don't include the local node at the beginning of the path, nor the destination at the end.

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection