be.ac.ulg.montefiore.run.totem.domain.model
Interface Link

All Superinterfaces:
DomainElement

public interface Link
extends DomainElement

Represent a Link in a Domain

Creation date: 12-Jan-2005 17:27:03

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be)

Nested Class Summary
static class Link.Type
           
 
Field Summary
static int STATUS_DOWN
           
static int STATUS_UP
           
 
Method Summary
 void addPriority(int priority)
          This function should be called after a priority is added to the domain.
 void addReservation(float bw)
           
 void addReservation(float bw, int priority)
           
 float getBandwidth()
           
 float[] getBCs()
           
 float getDelay()
           
 java.lang.String getDescription()
           
 int getDiffServBCM()
           
 DiffServModel getDiffServModel()
           
 NodeInterface getDstInterface()
           
 Node getDstNode()
           
 int getLinkStatus()
          Get the status of the link.
 Link.Type getLinkType()
           
 float getMaximumBandwidth()
          Return the maximum bandwidth of the link.
 float getMetric()
           
 float[] getRbw()
           
 float getReservableBandwidth()
           
 float getReservableBandwidth(int priority)
           
 float getReservableBandwidthCT(int ct)
           
 float getReservedBandwidth()
           
 float getReservedBandwidth(int priority)
           
 float getReservedBandwidthCT(int ct)
           
 NodeInterface getSrcInterface()
           
 Node getSrcNode()
           
 float getTEMetric()
           
 float getTotalReservableBandwidth()
           
 float getTotalReservedBandwidth()
           
 void removePriority(int priority)
          This function should be called after a priority is removed from the domain.
 void removeReservation(float bw)
           
 void removeReservation(float bw, int priority)
           
 void setBandwidth(float bw)
           
 void setBC(int ct, float value)
          Set the BC to the given value.
 void setDelay(float delay)
           
 void setDescription(java.lang.String description)
           
 void setDstInterface(java.lang.String dstInterfaceId)
           
 void setLinkStatus(int status)
           
 void setLinkType(Link.Type type)
           
 void setMaximumBandwidth(float value)
          Sets the bandwidth of the link.
 void setMetric(float metric)
           
 void setRbw(float[] rbw)
           
 void setSrcInterface(java.lang.String srcInterfaceId)
           
 void setTEMetric(float metric)
           
 
Methods inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.DomainElement
getId, setElementId
 

Field Detail

STATUS_UP

static final int STATUS_UP
See Also:
Constant Field Values

STATUS_DOWN

static final int STATUS_DOWN
See Also:
Constant Field Values
Method Detail

getSrcNode

Node getSrcNode()
                throws NodeNotFoundException
Throws:
NodeNotFoundException

getDstNode

Node getDstNode()
                throws NodeNotFoundException
Throws:
NodeNotFoundException

getSrcInterface

NodeInterface getSrcInterface()
                              throws NodeNotFoundException,
                                     NodeInterfaceNotFoundException
Throws:
NodeNotFoundException
NodeInterfaceNotFoundException

getDstInterface

NodeInterface getDstInterface()
                              throws NodeNotFoundException,
                                     NodeInterfaceNotFoundException
Throws:
NodeNotFoundException
NodeInterfaceNotFoundException

setSrcInterface

void setSrcInterface(java.lang.String srcInterfaceId)
                     throws NodeNotFoundException,
                            NodeInterfaceNotFoundException
Throws:
NodeNotFoundException
NodeInterfaceNotFoundException

setDstInterface

void setDstInterface(java.lang.String dstInterfaceId)
                     throws NodeNotFoundException,
                            NodeInterfaceNotFoundException
Throws:
NodeNotFoundException
NodeInterfaceNotFoundException

getDelay

float getDelay()

setDelay

void setDelay(float delay)

getBandwidth

float getBandwidth()

setBandwidth

void setBandwidth(float bw)
                  throws LinkCapacityExceededException
Throws:
LinkCapacityExceededException

setMaximumBandwidth

void setMaximumBandwidth(float value)
Sets the bandwidth of the link. This sets the true link capacity. It corresponds to mbw (Maximum Bandwidth) in IGP and bw in normal link.
It does not change the reservable bandwidth of the link (mrbw in igp).

Parameters:
value -

getMaximumBandwidth

float getMaximumBandwidth()
Return the maximum bandwidth of the link. It is the true link capacity.

Returns:
Returns the Mbw value of igp static section if exists. Otherwise returns the link bw.

getLinkStatus

int getLinkStatus()
Get the status of the link. Returns down if the source or destination node is down or link is down.

Returns:
Link.STATUS_UP if the link is UP and Link.STATUS_DOWN otherwise

setLinkStatus

void setLinkStatus(int status)
                   throws StatusTypeException
Throws:
StatusTypeException

getLinkType

Link.Type getLinkType()

setLinkType

void setLinkType(Link.Type type)

getMetric

float getMetric()

setMetric

void setMetric(float metric)

getTEMetric

float getTEMetric()

setTEMetric

void setTEMetric(float metric)

getReservableBandwidth

float getReservableBandwidth()

getReservedBandwidth

float getReservedBandwidth()

getTotalReservedBandwidth

float getTotalReservedBandwidth()

getTotalReservableBandwidth

float getTotalReservableBandwidth()

getReservedBandwidthCT

float getReservedBandwidthCT(int ct)

getReservableBandwidthCT

float getReservableBandwidthCT(int ct)

getReservableBandwidth

float getReservableBandwidth(int priority)

getReservedBandwidth

float getReservedBandwidth(int priority)

addReservation

void addReservation(float bw)
                    throws LinkCapacityExceededException
Throws:
LinkCapacityExceededException

addReservation

void addReservation(float bw,
                    int priority)
                    throws LinkCapacityExceededException
Throws:
LinkCapacityExceededException

getDiffServBCM

int getDiffServBCM()

getDiffServModel

DiffServModel getDiffServModel()

removeReservation

void removeReservation(float bw)
                       throws LinkCapacityExceededException
Throws:
LinkCapacityExceededException

removeReservation

void removeReservation(float bw,
                       int priority)
                       throws LinkCapacityExceededException
Throws:
LinkCapacityExceededException

getBCs

float[] getBCs()

setBC

void setBC(int ct,
           float value)
           throws DiffServConfigurationException,
                  LinkCapacityExceededException
Set the BC to the given value.

Parameters:
ct - class type
value -
Throws:
DiffServConfigurationException - when the classType cannot be found in the domain.
LinkCapacityExceededException - If the new BC value do not leave enough bandwidth for the current established LSPs.

getRbw

float[] getRbw()

setRbw

void setRbw(float[] rbw)

addPriority

void addPriority(int priority)
This function should be called after a priority is added to the domain. The new priority is added to the rbw array and the rbw array is refreshed (thanks to the BandwidthManagement). If the priority corresponds to a new class type, a correponding BC is added (with 0 bandwidth).
Warning: this method is not intended to be called directly.

Parameters:
priority - the priority that was added.

removePriority

void removePriority(int priority)
This function should be called after a priority is removed from the domain. The priority is removed from the rbw array and the rbw array is refreshed (thanks to the BandwidthManagement).

Parameters:
priority -

getDescription

java.lang.String getDescription()

setDescription

void setDescription(java.lang.String description)


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