flowsim.core
Class SimpleLinkManager

java.lang.Object
  |
  +--flowsim.core.LinkManagerImpl
        |
        +--flowsim.core.SimpleLinkManager

public final class SimpleLinkManager
extends LinkManagerImpl
implements FlowMonitor

Simple link manager which does recognise two type of classes: best-effort and non-best-effort. Best-effort are considered every flow with DS FlowImpl.DS_BEST_EFFORT. The rest of bandwidth not used by non-best-effort flows is equally divided among all best-effort flows (bandwidth is forced to that value). If a non-best-effort flow is added for which there isn't no space, it is blocked.

See Also:
FairLinkManager

Constructor Summary
SimpleLinkManager(Simulator s, Link link)
           
 
Method Summary
 long add(Flow flow)
           
static LinkManagerFactory factory(Simulator s)
           
 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)
           
 com.sun.java.util.collections.Iterator flows()
           
 int get_rbw_notbe()
           
 int get_reservable_bw()
           
 void print_debug_info()
           
 void remove(Flow flow)
          Explicitely removes a flow.
 java.lang.String toString()
           
 
Methods inherited from class flowsim.core.LinkManagerImpl
attach_monitor, bw_changed, detach_monitor, get_link, get_peer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleLinkManager

public SimpleLinkManager(Simulator s,
                         Link link)
Method Detail

factory

public static LinkManagerFactory factory(Simulator s)

flows

public com.sun.java.util.collections.Iterator flows()
Overrides:
flows in class LinkManagerImpl

get_reservable_bw

public int get_reservable_bw()

add

public long add(Flow flow)
Overrides:
add in class LinkManagerImpl

get_rbw_notbe

public int get_rbw_notbe()
Overrides:
get_rbw_notbe in class LinkManagerImpl

remove

public void remove(Flow flow)
Explicitely removes a flow. A flow is automatically removed when it is stopped or blocked.
Overrides:
remove in class LinkManagerImpl

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

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

print_debug_info

public void print_debug_info()
Overrides:
print_debug_info in class LinkManagerImpl