flowsim.slatr
Class UserVoice

java.lang.Object
  |
  +--flowsim.slatr.UserImpl
        |
        +--flowsim.slatr.UserVoice

public class UserVoice
extends UserImpl
implements FlowMonitor


Field Summary
protected  Distribution arrival
           
protected  int calls_per_second
           
protected  Distribution duration
           
protected  int flow_id
           
protected  java.util.Random r
           
protected  int router_port
           
protected  Topology t
           
protected  NodeChooser to_chooser
           
 
Fields inherited from class flowsim.slatr.UserImpl
budget, budget_incr, max_utility, node, port, s, utility
 
Constructor Summary
UserVoice(Simulator s, Topology t, Node node, int port, int router_port, int calls_per_second, int mean_duration, java.util.Random r, NodeChooser to_chooser, int flow_id)
           
 
Method Summary
 void flow_blocked(Flow f)
           
 void flow_changed_available_bw(Flow f, int was_bw)
           
 void flow_changed_bw(Flow f, int was_bw)
           
 void flow_changed_desired_bw(Flow f, int was_bw)
           
 void flow_started(Flow f)
           
 void flow_stopped(Flow f)
           
 void start_flow(Node dest, long duration)
           
 
Methods inherited from class flowsim.slatr.UserImpl
add_to_budget, get_budget_incr, get_budget, get_max_utility, get_node, get_port, get_utility, print_stats, remove_from_budget, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

t

protected final Topology t

r

protected final java.util.Random r

arrival

protected final Distribution arrival

duration

protected final Distribution duration

to_chooser

protected final NodeChooser to_chooser

calls_per_second

protected final int calls_per_second

flow_id

protected final int flow_id

router_port

protected final int router_port
Constructor Detail

UserVoice

public UserVoice(Simulator s,
                 Topology t,
                 Node node,
                 int port,
                 int router_port,
                 int calls_per_second,
                 int mean_duration,
                 java.util.Random r,
                 NodeChooser to_chooser,
                 int flow_id)
Parameters:
node - node where the user resides
port - port where the user resides
budget_incr - budget increase pro second
server_port - port of (unique) SLASeller for this user
calls_per_second - number of calls per second which should be generated (randomly)
mean_duration - average duration of calls in microseconds
r - Random object used to make random call distribution
Method Detail

flow_started

public void flow_started(Flow f)
Specified by:
flow_started in interface FlowMonitor

flow_stopped

public void flow_stopped(Flow f)
Specified by:
flow_stopped in interface FlowMonitor

flow_blocked

public void flow_blocked(Flow f)
Specified by:
flow_blocked in interface FlowMonitor

flow_changed_bw

public void flow_changed_bw(Flow f,
                            int was_bw)
Specified by:
flow_changed_bw in interface FlowMonitor

flow_changed_desired_bw

public void flow_changed_desired_bw(Flow f,
                                    int was_bw)
Specified by:
flow_changed_desired_bw in interface FlowMonitor

flow_changed_available_bw

public void flow_changed_available_bw(Flow f,
                                      int was_bw)
Specified by:
flow_changed_available_bw in interface FlowMonitor

start_flow

public void start_flow(Node dest,
                       long duration)