bamboo.dht
Class FairShareTestClient

java.lang.Object
  extended by bamboo.util.StandardStage
      extended by bamboo.dht.FairShareTestClient
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class FairShareTestClient
extends StandardStage
implements SingleThreadedEventHandlerIF

Puts at a given rate, for use in testing fair sharing. Does not keep track of what or how much it has put.

Version:
$Id: FairShareTestClient.java,v 1.2 2004/11/13 18:35:16 srhea Exp $
Author:
Sean C. Rhea

Field Summary
protected  ASyncCore acore
           
protected  GatewayClient client
           
 ASyncCore.TimerCB do_put_cb
           
protected  double mean_wait_ms
           
 GatewayClient.PutDoneCb put_done_cb
           
protected  int put_size
           
protected  int put_ttl_sec
           
protected  Random rand
           
 
Fields inherited from class bamboo.util.StandardStage
classifier, DEBUG, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, sim_running
 
Constructor Summary
FairShareTestClient()
           
 
Method Summary
 void handleEvent(QueueElementIF item)
           
 void init(ConfigDataIF config)
           
protected  void next_op()
           
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

rand

protected Random rand

client

protected GatewayClient client

acore

protected ASyncCore acore

mean_wait_ms

protected double mean_wait_ms

put_size

protected int put_size

put_ttl_sec

protected int put_ttl_sec

do_put_cb

public ASyncCore.TimerCB do_put_cb

put_done_cb

public GatewayClient.PutDoneCb put_done_cb
Constructor Detail

FairShareTestClient

public FairShareTestClient()
Method Detail

random_exponential

protected static double random_exponential(double mean,
                                           Random rand)

next_op

protected void next_op()

init

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

handleEvent

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