bamboo.openhash.redir
Class RedirTest

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

public class RedirTest
extends StandardStage
implements SingleThreadedEventHandlerIF

An implementation of ReDiR.

Version:
$Id: RedirTest.java,v 1.6 2004/11/19 22:59:27 srhea Exp $
Author:
Sean C. Rhea

Field Summary
protected static String APP
           
protected  RedirClient client
           
protected  MessageDigest digest
           
protected static TreeMap instances
           
 RedirClient.JoinCb join_cb
           
protected  int levels
           
protected  long lookup_delay_ms
           
 RedirClient.LookupCb lookup_done_cb
           
protected  double mean_period_ms
           
protected  InetSocketAddress my_addr
           
protected  BigInteger my_id
           
protected  BigInteger namespace
           
 ASyncCore.TimerCB next_lookup_cb
           
protected  Random rand
           
 ASyncCore.TimerCB ready_cb
           
 ASyncCore.TimerCB start_lookups_cb
           
 
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
RedirTest()
           
 
Method Summary
 void handleEvent(QueueElementIF item)
           
 void init(ConfigDataIF config)
           
protected  void next_lookup()
           
protected static double random_exponential(double mean, Random rand)
           
 
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

my_addr

protected InetSocketAddress my_addr

my_id

protected BigInteger my_id

client

protected RedirClient client

rand

protected Random rand

namespace

protected BigInteger namespace

digest

protected MessageDigest digest

levels

protected int levels

mean_period_ms

protected double mean_period_ms

lookup_delay_ms

protected long lookup_delay_ms

instances

protected static TreeMap instances

ready_cb

public ASyncCore.TimerCB ready_cb

join_cb

public RedirClient.JoinCb join_cb

start_lookups_cb

public ASyncCore.TimerCB start_lookups_cb

next_lookup_cb

public ASyncCore.TimerCB next_lookup_cb

lookup_done_cb

public RedirClient.LookupCb lookup_done_cb
Constructor Detail

RedirTest

public RedirTest()
Method Detail

init

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

random_exponential

protected static double random_exponential(double mean,
                                           Random rand)

next_lookup

protected void next_lookup()

handleEvent

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