be.ac.ulg.montefiore.run.totem.domain.model.impl
Class DiffServBandwidthManagementSnapshot

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.domain.model.impl.DiffServBandwidthManagement
      extended by be.ac.ulg.montefiore.run.totem.domain.model.impl.DiffServBandwidthManagementSnapshot
All Implemented Interfaces:
BandwidthManagement

public class DiffServBandwidthManagementSnapshot
extends DiffServBandwidthManagement

This class implements a snapshot of the manages DiffServBandwidthManagement. Adding or removing lsps do not change change the reserved bandwidth on the links. It also maintain a list of lsp traversing every link of the domain.
This implementation uses preemption. it also uses Diffserv model to update link reservable bandwidth.

Creation date: 14/12/2007

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

Field Summary
 
Fields inherited from class be.ac.ulg.montefiore.run.totem.domain.model.impl.DiffServBandwidthManagement
domain
 
Constructor Summary
DiffServBandwidthManagementSnapshot(Domain domain)
          Create a new DiffServBandwidthManagement object to use with the given domain.
 
Method Summary
 void addLsp(Lsp lsp)
          Add the reservation of this LSPs to the temporary data maintained by this class.
protected  void addReservation(Link link, float bw, int prio)
          Add the reservation to the data maintained by this class.
protected  java.util.List<Lsp> getLspsOnLink(Link link)
          Returns the list of LSPs traversing the given link.
protected  float[] getRbw(Link link)
          Return the rbw array associated with the given link.
protected  float getReservedBandwidth(Link link)
          returns the total resserved badnwidth among all classtypes.
 void removeLsp(Lsp lsp)
          Removes the reservation associated with the LSP in the temporary data maintained by this class.
protected  void removeReservation(Link link, float bw, int prio)
          Remove the reservation from the data maintained by this class.
 
Methods inherited from class be.ac.ulg.montefiore.run.totem.domain.model.impl.DiffServBandwidthManagement
getPreemptList, getReservableBandwidth, getSnapshot, init, lspCanBeEstablished, recomputeRbw, usePreemption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffServBandwidthManagementSnapshot

public DiffServBandwidthManagementSnapshot(Domain domain)
Create a new DiffServBandwidthManagement object to use with the given domain.

Parameters:
domain -
Method Detail

getRbw

protected float[] getRbw(Link link)
Return the rbw array associated with the given link. It returns the temporary data or the real rbw array if no temporary data exists.

Overrides:
getRbw in class DiffServBandwidthManagement
Parameters:
link -
Returns:

getLspsOnLink

protected java.util.List<Lsp> getLspsOnLink(Link link)
Returns the list of LSPs traversing the given link. This method takes into account previous calls to addLsp(be.ac.ulg.montefiore.run.totem.domain.model.Lsp) and removeLsp(be.ac.ulg.montefiore.run.totem.domain.model.Lsp).

Parameters:
link -
Returns:

getReservedBandwidth

protected float getReservedBandwidth(Link link)
returns the total resserved badnwidth among all classtypes.

Overrides:
getReservedBandwidth in class DiffServBandwidthManagement
Returns:

addReservation

protected void addReservation(Link link,
                              float bw,
                              int prio)
                       throws LinkCapacityExceededException
Add the reservation to the data maintained by this class. It does not affect the link reservation.

Overrides:
addReservation in class DiffServBandwidthManagement
Parameters:
link -
bw -
prio -
Throws:
LinkCapacityExceededException

removeReservation

protected void removeReservation(Link link,
                                 float bw,
                                 int prio)
                          throws LinkCapacityExceededException
Remove the reservation from the data maintained by this class. It does not affect the link reservation.

Overrides:
removeReservation in class DiffServBandwidthManagement
Parameters:
link -
bw -
prio -
Throws:
LinkCapacityExceededException

addLsp

public void addLsp(Lsp lsp)
            throws LinkCapacityExceededException
Add the reservation of this LSPs to the temporary data maintained by this class. Also updates the list of lsps traversing link on the lsp path.

Specified by:
addLsp in interface BandwidthManagement
Overrides:
addLsp in class DiffServBandwidthManagement
Parameters:
lsp -
Throws:
LinkCapacityExceededException

removeLsp

public void removeLsp(Lsp lsp)
               throws LinkCapacityExceededException
Removes the reservation associated with the LSP in the temporary data maintained by this class. Also updates the list of lsps traversing link on the lsp path.

Specified by:
removeLsp in interface BandwidthManagement
Overrides:
removeLsp in class DiffServBandwidthManagement
Parameters:
lsp -
Throws:
LinkCapacityExceededException


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