be.ac.ulg.montefiore.run.totem.domain.diffserv
Class MAM

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.domain.diffserv.MAM
All Implemented Interfaces:
DiffServModel

public class MAM
extends java.lang.Object
implements DiffServModel

Implementation of the MAM diffserv model. See RFC4125.

Creation date: 10/11/2006

Author:
Gaƫl Monfort (monfort@run.montefiore.ulg.ac.be)

Method Summary
 float[] addReservation(Domain domain, int priority, float bw, float[] bc, float[] rbwArray, float mrbw)
          Adds a reservation at a given priority to the rbw array.
 boolean checkModelConstraints(Domain domain, int priority, float bw, float[] bc, float[] rbw, float mrbw)
          Check that when new bandwidth will be asked for priority, constraints induced by BCM will still be satisfied.
static MAM getInstance()
           
 float getReservableBandwidth(Domain domain, int priority, float[] bc, float[] rbw, float mrbw)
          Returns the reservable bandwidth at given priority level.
 float getReservedBandwidth(Domain domain, int priority, float[] bc, float[] rbw)
          Returns the reserved bandwidth at given priority level in the class type to which priority belongs.
 float getTotalReservedBandwidth(Domain domain, int preemptionLevel, float[] bc, float[] rbw)
          Returns the total reserved bandwidth among all class types at a given preemption level.
 float[] removeReservation(Domain domain, int priority, float bw, float[] bc, float[] rbwArray, float mrbw)
          Removes a reservation at a given priority to the rbw array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MAM getInstance()

getReservableBandwidth

public float getReservableBandwidth(Domain domain,
                                    int priority,
                                    float[] bc,
                                    float[] rbw,
                                    float mrbw)
Returns the reservable bandwidth at given priority level.

Specified by:
getReservableBandwidth in interface DiffServModel
Parameters:
domain -
priority -
bc -
rbw -
mrbw -
Returns:

getReservedBandwidth

public float getReservedBandwidth(Domain domain,
                                  int priority,
                                  float[] bc,
                                  float[] rbw)
Description copied from interface: DiffServModel
Returns the reserved bandwidth at given priority level in the class type to which priority belongs.

Specified by:
getReservedBandwidth in interface DiffServModel
Returns:

getTotalReservedBandwidth

public float getTotalReservedBandwidth(Domain domain,
                                       int preemptionLevel,
                                       float[] bc,
                                       float[] rbw)
Returns the total reserved bandwidth among all class types at a given preemption level. This is the sum of reserved bw of all class types

Specified by:
getTotalReservedBandwidth in interface DiffServModel
Parameters:
domain -
preemptionLevel -
bc -
rbw -
Returns:

checkModelConstraints

public boolean checkModelConstraints(Domain domain,
                                     int priority,
                                     float bw,
                                     float[] bc,
                                     float[] rbw,
                                     float mrbw)
Check that when new bandwidth will be asked for priority, constraints induced by BCM will still be satisfied. For MAM, we just want for the CT from priority that the sum of reserved bandwidth for all preemption levels is under the corresponding BC and that the total reserved bandwidth is under the maximum reservable bandwidth.

Specified by:
checkModelConstraints in interface DiffServModel
Parameters:
domain -
priority -
bw -
bc -
rbw -
mrbw -
Returns:

addReservation

public float[] addReservation(Domain domain,
                              int priority,
                              float bw,
                              float[] bc,
                              float[] rbwArray,
                              float mrbw)
                       throws LinkCapacityExceededException
Adds a reservation at a given priority to the rbw array.

Specified by:
addReservation in interface DiffServModel
Parameters:
domain -
priority -
bw -
bc -
rbwArray -
mrbw -
Returns:
Throws:
LinkCapacityExceededException - if the constraints cannot be satisfied.

removeReservation

public float[] removeReservation(Domain domain,
                                 int priority,
                                 float bw,
                                 float[] bc,
                                 float[] rbwArray,
                                 float mrbw)
                          throws LinkCapacityExceededException
Removes a reservation at a given priority to the rbw array.

Specified by:
removeReservation in interface DiffServModel
Parameters:
domain -
priority -
bw -
bc -
rbwArray -
mrbw -
Returns:
Throws:
LinkCapacityExceededException - if the constraints are no longer satisfied.


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.