|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.totem.domain.model.impl.DiffServBandwidthManagement
public class DiffServBandwidthManagement
This class manages link bandwidth. Adding or removing lsps changes the reserved bandwidth on the links.
This implementation uses preemption. it also uses Diffserv model to update link reservable bandwidth.
Creation date: 3/11/2006
Field Summary | |
---|---|
protected Domain |
domain
|
Constructor Summary | |
---|---|
DiffServBandwidthManagement(Domain domain)
Create a new DiffServBandwidthManagement object to use with the given domain. |
Method Summary | |
---|---|
void |
addLsp(Lsp lsp)
Add lsp reservation. |
protected void |
addReservation(Link link,
float bw,
int prio)
Add some reservation to the given link. |
java.util.List<Lsp> |
getPreemptList(Lsp lsp)
Returns the list of lsps to be preempted when a lsp is to be added to the domain. |
protected float[] |
getRbw(Link link)
Return the rbw array associated with the given link. |
float |
getReservableBandwidth(int priority,
Link link,
java.util.Collection<Link> protectedLinks)
Returns the maximum reservable bandwidth at priority level priority for a
lsp traversing the link link . |
protected float |
getReservedBandwidth(Link link)
Returns the total reserved bandwidth among all classtypes. |
DiffServBandwidthManagementSnapshot |
getSnapshot()
Returns a snapshot of the reservation in the domain. |
void |
init()
Initialise the Bandwidth Management object with the lsps already present in the domain. |
protected boolean |
lspCanBeEstablished(Link link,
int priority,
float reservation)
Perform admission control for preemption on link link for an lsp to be established at priority
priority with reservation bandwidth. |
void |
recomputeRbw(Link link)
Recompute the reservable bandwidth (rbw array) of the link link |
void |
removeLsp(Lsp lsp)
Removes lsp reservation. |
protected void |
removeReservation(Link link,
float bw,
int prio)
Remove some reservation to the given link. |
boolean |
usePreemption()
returns true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Domain domain
Constructor Detail |
---|
public DiffServBandwidthManagement(Domain domain)
domain
- Method Detail |
---|
public void init() throws LinkCapacityExceededException
init
in interface BandwidthManagement
LinkCapacityExceededException
- if the calculated bandwidth exceed link capacityprotected float[] getRbw(Link link)
link
-
protected void addReservation(Link link, float bw, int prio) throws LinkCapacityExceededException
link
- bw
- prio
-
LinkCapacityExceededException
protected void removeReservation(Link link, float bw, int prio) throws LinkCapacityExceededException
link
- bw
- prio
-
LinkCapacityExceededException
public java.util.List<Lsp> getPreemptList(Lsp lsp) throws LinkCapacityExceededException
getPreemptList
in interface BandwidthManagement
lsp
- the Lsp to be added to the domain
LinkCapacityExceededException
protected boolean lspCanBeEstablished(Link link, int priority, float reservation)
link
for an lsp to be established at priority
priority
with reservation
bandwidth.There must be enough reservable bandwidth in the lsp classtype at the min priority value and the total reserved bandwidth on the link should not exceed the link max reservable bandwidth.
link
- priority
- reservation
-
public void addLsp(Lsp lsp) throws LinkCapacityExceededException
addLsp
in interface BandwidthManagement
lsp
-
LinkCapacityExceededException
- If not enough bandwidth is availablepublic void removeLsp(Lsp lsp) throws LinkCapacityExceededException
removeLsp
in interface BandwidthManagement
lsp
-
LinkCapacityExceededException
public boolean usePreemption()
usePreemption
in interface BandwidthManagement
public float getReservableBandwidth(int priority, Link link, java.util.Collection<Link> protectedLinks)
priority
for a
lsp traversing the link link
. If protectedLinks
is given, the reservable bandwidth for
a backup lsp protecting those links is returned, otherwise, a primary lsp is assumed.
getReservableBandwidth
in interface BandwidthManagement
priority
- link
- protectedLinks
-
protected float getReservedBandwidth(Link link)
public void recomputeRbw(Link link) throws LinkCapacityExceededException
link by using the lsps established in
the domain.
Warning: all rbw values should be set to 0 before calling this method.
- Specified by:
recomputeRbw
in interface BandwidthManagement
- Parameters:
link
-
- Throws:
LinkCapacityExceededException
public DiffServBandwidthManagementSnapshot getSnapshot()
getSnapshot
in interface BandwidthManagement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |