bamboo.openhash.i3
Class LookupService

java.lang.Object
  extended by bamboo.util.StandardStage
      extended by bamboo.openhash.i3.LookupService
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class LookupService
extends StandardStage
implements SingleThreadedEventHandlerIF

Used to replace the i3 chord_server with a ReDiR-based lookup service.

Version:
$Id: LookupService.java,v 1.6 2004/11/20 18:06:14 srhea Exp $
Author:
Sean C. Rhea

Nested Class Summary
static class LookupService.I3Msg
           
static class LookupService.PredMsg
           
 
Field Summary
protected static String APP
           
protected  DatagramChannel channel
           
protected  RedirClient client
           
 RedirClient.LookupCb found_succ_cb
           
protected  InetSocketAddress i3_addr
           
protected  UdpCC.SendCB i3_send_cb
           
 RedirClient.JoinCb join_cb
           
protected  int levels
           
 RedirClient.LookupCb lookup_cb
           
protected  InetSocketAddress my_addr
           
protected  BigInteger my_id
           
protected  BigInteger namespace
           
protected  BigInteger pred_id
           
protected  UdpCC.SendCB pred_send_cb
           
protected  ByteBuffer read_buf
           
 ASyncCore.TimerCB ready_cb
           
protected  ASyncCore.SelectableCB select_cb
           
protected  UdpCC.Serializer serializer
           
protected  UdpCC.Sink sink
           
protected  SelectionKey skey
           
protected  ASyncCore.TimerCB stabilize_cb
           
protected  BigInteger succ_id
           
protected  UdpCC udpcc
           
protected  LinkedList waiting
           
 
Fields inherited from class bamboo.util.StandardStage
acore, classifier, DEBUG, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, sim_running
 
Constructor Summary
LookupService()
           
 
Method Summary
 void handle_inb_pkt(InetSocketAddress src, ByteBuffer pkt)
           
 void handleEvent(QueueElementIF item)
           
 void init(ConfigDataIF config)
           
protected  void send_i3_range()
           
protected  void send_pkt(ByteBuffer pkt)
           
 
Methods inherited from class bamboo.util.StandardStage
BUG, BUG, BUG, config_get_boolean, config_get_double, config_get_int, config_get_string, configGetInt, destroy, dispatch, enqueue, handleEvents, lookup_stage, now_ms, timer_ms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP

protected static final String APP
See Also:
Constant Field Values

channel

protected DatagramChannel channel

read_buf

protected ByteBuffer read_buf

waiting

protected LinkedList waiting

skey

protected SelectionKey skey

client

protected RedirClient client

namespace

protected BigInteger namespace

my_id

protected BigInteger my_id

succ_id

protected BigInteger succ_id

pred_id

protected BigInteger pred_id

levels

protected int levels

my_addr

protected InetSocketAddress my_addr

i3_addr

protected InetSocketAddress i3_addr

udpcc

protected UdpCC udpcc

select_cb

protected ASyncCore.SelectableCB select_cb

serializer

protected UdpCC.Serializer serializer

sink

protected UdpCC.Sink sink

ready_cb

public ASyncCore.TimerCB ready_cb

join_cb

public RedirClient.JoinCb join_cb

found_succ_cb

public RedirClient.LookupCb found_succ_cb

pred_send_cb

protected UdpCC.SendCB pred_send_cb

stabilize_cb

protected ASyncCore.TimerCB stabilize_cb

lookup_cb

public RedirClient.LookupCb lookup_cb

i3_send_cb

protected UdpCC.SendCB i3_send_cb
Constructor Detail

LookupService

public LookupService()
Method Detail

handle_inb_pkt

public void handle_inb_pkt(InetSocketAddress src,
                           ByteBuffer pkt)

init

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

send_i3_range

protected void send_i3_range()

send_pkt

protected void send_pkt(ByteBuffer pkt)

handleEvent

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