dd.router
Class Router

java.lang.Object
  |
  +--ostore.util.StandardStage
        |
        +--dd.router.Router
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class Router
extends StandardStage
implements SingleThreadedEventHandlerIF

Router is a DHT independent router.

Version:
$Id: Router.java,v 1.17 2004/05/21 04:08:06 hweather Exp $
Author:
Hakim Weatherspoon

Field Summary
protected static long app_id
          Unique identifier for this stage.
protected  long init_start_time_ms
          The time this stage was started.
protected  boolean initialized
          Registered with DHT dependent stage and all local stages initialized
protected  boolean iterative_routing
          Whether or not we do iterative routing for DDRouteMsgs and DDPrefixRouteMsgs.
protected  KbrNeighborInfo[] ls
          Root set in terms of predecessor and successors.
protected  SecureHash my_guid
          GUID (SecureHash) of the local server where this stage is running.
protected  KbrNeighborInfo my_neighbor_info
          NodeId and GUID of the local server where this stage is running.
protected  long next_pub_seq
          Unique number for publish requests.
protected  int search_leaf_set_ttl
          NOT USED
protected  Map unacked_pubs
          Map of unacked publish requests.
 
Fields inherited from class ostore.util.StandardStage
classifier, DEBUG, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, resender, resender_tokens, serializable_types, sim_running, tag
 
Constructor Summary
Router()
          Constructor: Creates a new Router stage.
 
Method Summary
protected  void handle_get_ptr_resp(GetPtrResp resp)
           
protected  void handle_publish_ack_deliver(PublishDataAck ack)
           
protected  void handle_publish_deliver(KbrRouteDeliver msg, PublishData pd)
           
protected  void handle_publish_upcall(KbrRouteUpcall msg, PublishData pd)
           
protected  void handle_route_deliver(KbrRouteDeliver msg, RouteData rd)
           
protected  void handle_route_dest_deliver(KbrRouteDeliver msg, RouteDestData rdd)
           
protected  void handle_route_dest_upcall(KbrRouteUpcall msg, RouteDestData rdd)
           
protected  void handle_route_root_deliver_cont(GetPtrResp resp, dd.router.Router.SearchPointersState state)
           
protected  void handle_route_root_deliver(KbrRouteDeliver msg, RouteRootData rrd)
           
protected  void handle_route_root_upcall_cont(GetPtrResp resp, dd.router.Router.SearchPointersState state)
           
protected  void handle_route_root_upcall(KbrRouteUpcall msg, RouteRootData rrd)
           
protected  void handle_route_upcall(KbrRouteUpcall msg, RouteData rd)
           
protected  void handle_tap_locate_msg_cont(GetPtrResp resp, dd.router.Router.SearchPointersState state)
           
protected  void handle_tap_locate_msg(DDLocateMsg msg)
           
protected  void handle_tap_prefix_route_msg(DDPrefixRouteMsg msg)
           
protected  void handle_tap_pub_msg(DDPublishReq msg)
           
protected  void handle_tap_route_msg(DDRouteMsg msg)
           
 void handleEvent(QueueElementIF item)
           
protected  void handleKbrRootSetChanged(KbrRootSetChanged msg)
          handleKbrRootSetChanged stores the new root set locally.
protected  void handleKbrRouteDeliver(KbrRouteDeliver msg)
           
protected  void handleKbrRouteUpcall(KbrRouteUpcall msg)
           
 void init(ConfigDataIF config)
           
protected  void now_sus(long[] tsec, int[] tusec)
           
protected  boolean route_to_dest(GetPtrResp resp, dd.router.Router.SearchPointersState state)
          Now that the asynch call to the ptr mgr is done, keep on keepin on
 
Methods inherited from class ostore.util.StandardStage
BUG, BUG, BUG, destroy, dispatch, enqueue, handleEvents, now_ms, now_us
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

app_id

protected static final long app_id
Unique identifier for this stage.


my_guid

protected SecureHash my_guid
GUID (SecureHash) of the local server where this stage is running.


my_neighbor_info

protected KbrNeighborInfo my_neighbor_info
NodeId and GUID of the local server where this stage is running.


initialized

protected boolean initialized
Registered with DHT dependent stage and all local stages initialized


iterative_routing

protected boolean iterative_routing
Whether or not we do iterative routing for DDRouteMsgs and DDPrefixRouteMsgs.


init_start_time_ms

protected long init_start_time_ms
The time this stage was started.


ls

protected KbrNeighborInfo[] ls
Root set in terms of predecessor and successors.


search_leaf_set_ttl

protected int search_leaf_set_ttl
NOT USED


next_pub_seq

protected long next_pub_seq
Unique number for publish requests.


unacked_pubs

protected Map unacked_pubs
Map of unacked publish requests. ->

Constructor Detail

Router

public Router()
       throws Exception
Constructor: Creates a new Router stage.

Method Detail

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Overrides:
init in class StandardStage
Exception

handleEvent

public void handleEvent(QueueElementIF item)
Specified by:
handleEvent in interface EventHandlerIF

handleKbrRootSetChanged

protected void handleKbrRootSetChanged(KbrRootSetChanged msg)
handleKbrRootSetChanged stores the new root set locally.

Parameters:
msg - KbrRootSetChanged.

handle_tap_route_msg

protected void handle_tap_route_msg(DDRouteMsg msg)

handle_tap_prefix_route_msg

protected void handle_tap_prefix_route_msg(DDPrefixRouteMsg msg)

handle_tap_pub_msg

protected void handle_tap_pub_msg(DDPublishReq msg)

handle_tap_locate_msg

protected void handle_tap_locate_msg(DDLocateMsg msg)

handle_tap_locate_msg_cont

protected void handle_tap_locate_msg_cont(GetPtrResp resp,
                                          dd.router.Router.SearchPointersState state)

handleKbrRouteUpcall

protected void handleKbrRouteUpcall(KbrRouteUpcall msg)

handle_route_upcall

protected void handle_route_upcall(KbrRouteUpcall msg,
                                   RouteData rd)

handle_route_root_upcall

protected void handle_route_root_upcall(KbrRouteUpcall msg,
                                        RouteRootData rrd)

handle_route_root_upcall_cont

protected void handle_route_root_upcall_cont(GetPtrResp resp,
                                             dd.router.Router.SearchPointersState state)

handle_route_dest_upcall

protected void handle_route_dest_upcall(KbrRouteUpcall msg,
                                        RouteDestData rdd)

handle_publish_upcall

protected void handle_publish_upcall(KbrRouteUpcall msg,
                                     PublishData pd)

handleKbrRouteDeliver

protected void handleKbrRouteDeliver(KbrRouteDeliver msg)

handle_route_deliver

protected void handle_route_deliver(KbrRouteDeliver msg,
                                    RouteData rd)

handle_route_root_deliver

protected void handle_route_root_deliver(KbrRouteDeliver msg,
                                         RouteRootData rrd)

handle_route_root_deliver_cont

protected void handle_route_root_deliver_cont(GetPtrResp resp,
                                              dd.router.Router.SearchPointersState state)

handle_route_dest_deliver

protected void handle_route_dest_deliver(KbrRouteDeliver msg,
                                         RouteDestData rdd)

handle_publish_deliver

protected void handle_publish_deliver(KbrRouteDeliver msg,
                                      PublishData pd)

handle_publish_ack_deliver

protected void handle_publish_ack_deliver(PublishDataAck ack)

handle_get_ptr_resp

protected void handle_get_ptr_resp(GetPtrResp resp)

route_to_dest

protected boolean route_to_dest(GetPtrResp resp,
                                dd.router.Router.SearchPointersState state)
Now that the asynch call to the ptr mgr is done, keep on keepin on


now_sus

protected void now_sus(long[] tsec,
                       int[] tusec)