|
||||||||||
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.jaxb.impl.LinkImpl
be.ac.ulg.montefiore.run.totem.domain.model.impl.LinkImpl
public class LinkImpl
Represent a Link in a Domain
Creation date: 12-Jan-2005 17:27:03
Nested Class Summary |
---|
Nested classes/interfaces inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LinkImpl |
---|
LinkImpl.FromTypeImpl, LinkImpl.SrlgsTypeImpl, LinkImpl.ToTypeImpl, LinkImpl.Unmarshaller |
Nested classes/interfaces inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.Link |
---|
Link.Type |
Nested classes/interfaces inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.jaxb.Link |
---|
Link.FromType, Link.SrlgsType, Link.ToType |
Field Summary |
---|
Fields inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LinkImpl |
---|
_Bw, _Delay, _Description, _From, _Id, _Srlgs, _Status, _Technology, _To, _Type, has_Bw, has_Delay, version |
Fields inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.Link |
---|
STATUS_DOWN, STATUS_UP |
Constructor Summary | |
---|---|
LinkImpl()
|
|
LinkImpl(Domain domain,
java.lang.String id,
java.lang.String src,
java.lang.String dst,
float bandwidth)
Basic constructor |
Method Summary | |
---|---|
void |
addPriority(int priority)
This function should be called after a priority is added to the domain. |
void |
addReservation(float bw)
Adds a reservation on the link As no priority is specified, this reservation is added to lowest prioritary class type and preemption level |
void |
addReservation(float bw,
int priority)
Adds a reservation on the link for a given priority (constraints are checked) |
boolean |
equals(java.lang.Object o)
Two links are equal if they belong to the same domain and have the same id. |
float |
getBandwidth()
Return the maximum reservable bandwidth of the link if defined. |
float[] |
getBCs()
Gets the BCs, should not be needed for most algorithms |
int |
getDiffServBCM()
|
DiffServModel |
getDiffServModel()
|
Domain |
getDomain()
returns the associated domain |
NodeInterface |
getDstInterface()
Returns the interface of the destination node used by this link. |
Node |
getDstNode()
Returns the destination node. |
LinkIgp |
getIgpLink()
Get the IGP link associated to the link |
int |
getLinkStatus()
Get the status of the link. |
Link.Type |
getLinkType()
Get the type of the node. |
float |
getMaximumBandwidth()
Return the maximum bandwidth of the link. |
float |
getMetric()
Return the metric of the link |
float[] |
getRbw()
|
float |
getReservableBandwidth()
Return the reservable bandwidth of the link (for the classType corresponding to minimum priority) |
float |
getReservableBandwidth(int priority)
Return the reservable bandwidth of the link for a given priority (found in database) If domain does not use preemptions, the reservable bandwidth for minimum priority in the same class type is returned. |
float |
getReservableBandwidthCT(int ct)
|
float[] |
getReservations()
Returns a copy of the reservation array. |
float |
getReservedBandwidth()
Return the reserved bandwidth of the link for the classType corresponding to minimum priority |
float |
getReservedBandwidth(int priority)
Return the reserved bandwidth of the link for a given priority (bandwidth constraints model is used) |
float |
getReservedBandwidthCT(int ct)
Return the reserved bandwidth of the link for the given classType |
NodeInterface |
getSrcInterface()
Returns the interface of the source node used by this link. |
Node |
getSrcNode()
Returns the source node. |
float |
getTEMetric()
Return the TE metric of the link |
float |
getTotalReservableBandwidth()
|
float |
getTotalReservedBandwidth()
|
int |
hashCode()
|
void |
init(Domain domain)
Initialize a link. |
void |
removePriority(int priority)
This function should be called after a priority is removed from the domain. |
void |
removeReservation(float bw)
Removes a reservation from the default priority, and update reservable bandwidths accordingly |
void |
removeReservation(float bw,
int priority)
Removes a reservation from the priority specified, and update reservable bandwidths accordingly |
void |
setBandwidth(float bw)
Sets the maximum reservable bandwidth of the link. |
void |
setBC(int ct,
float value)
Set the BC to the given value. |
void |
setDstInterface(java.lang.String dstInterfaceId)
Sets the destination interface. |
void |
setElementId(java.lang.String id)
Sets the id of the element. |
void |
setLinkStatus(int status)
Set the status of a link |
void |
setLinkType(Link.Type type)
|
void |
setMaximumBandwidth(float value)
Sets the bandwidth of the link. |
void |
setMetric(float metric)
Sets the metric of the link. |
void |
setRbw(float[] rbw)
|
void |
setSrcInterface(java.lang.String srcInterfaceId)
Sets the source interface. |
void |
setTEMetric(float metric)
Sets the TE metric of the link. |
Methods inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LinkImpl |
---|
createRawValidator, createUnmarshaller, getBw, getDelay, getDescription, getFrom, getId, getPrimaryInterface, getSrlgs, getStatus, getTechnology, getTo, getType, isSetBw, isSetDelay, isSetDescription, isSetFrom, isSetId, isSetSrlgs, isSetStatus, isSetTechnology, isSetTo, isSetType, serializeAttributes, serializeBody, serializeURIs, setBw, setDelay, setDescription, setFrom, setId, setSrlgs, setStatus, setTechnology, setTo, setType, unsetBw, unsetDelay, unsetDescription, unsetFrom, unsetId, unsetSrlgs, unsetStatus, unsetTechnology, unsetTo, unsetType |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.Link |
---|
getDelay, getDescription, setDelay, setDescription |
Methods inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.DomainElement |
---|
getId |
Constructor Detail |
---|
public LinkImpl()
public LinkImpl(Domain domain, java.lang.String id, java.lang.String src, java.lang.String dst, float bandwidth)
domain
- id
- src
- id of the src nodedst
- id the dst nodebandwidth
- Method Detail |
---|
public LinkIgp getIgpLink()
public void init(Domain domain) throws DiffServConfigurationException
domain
-
DiffServConfigurationException
public Node getSrcNode() throws NodeNotFoundException
NodeNotFoundException
public Node getDstNode() throws NodeNotFoundException
NodeNotFoundException
public NodeInterface getSrcInterface() throws NodeNotFoundException, NodeInterfaceNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException
public NodeInterface getDstInterface() throws NodeNotFoundException, NodeInterfaceNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException
public void setSrcInterface(java.lang.String srcInterfaceId) throws NodeNotFoundException, NodeInterfaceNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException
public void setDstInterface(java.lang.String dstInterfaceId) throws NodeNotFoundException, NodeInterfaceNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException
public float getBandwidth()
public void setBandwidth(float bw) throws LinkCapacityExceededException, DiffServConfigurationException
If the domain has only one classtype and the associated bandwidth constraint is equal to the the bandwidth value,
the constraint is also modified.
For example, this permits reducing link capacity with the MAM model (as the bandwidth constraints must be inferior
or equal to the mrbw)
bw
- the new bandwidth
LinkCapacityExceededException
- If all the LSPs cannot be established with the new bandwidth value
DiffServConfigurationException
- If the diffserv constraints are not satisfied anymorepublic void setMaximumBandwidth(float value)
value
- public float getMaximumBandwidth()
public int getLinkStatus()
public void setLinkStatus(int status) throws StatusTypeException
status
-
StatusTypeException
- if status is neither STATUS_DOWN nor STATUS_UPpublic Link.Type getLinkType()
Link.Type
. Link.Type.INTRA
if type is not set.public void setLinkType(Link.Type type)
public float getMetric()
public void setMetric(float metric)
metric
- The new metric of the link.public float getTEMetric()
public void setTEMetric(float metric)
metric
- The new TE metric of the link.public float getReservableBandwidth()
public float getReservedBandwidth()
public float[] getReservations()
public float getTotalReservedBandwidth()
public float getTotalReservableBandwidth()
public float getReservedBandwidthCT(int ct)
ct
-
public float getReservableBandwidthCT(int ct)
public float getReservableBandwidth(int priority)
priority
-
public float getReservedBandwidth(int priority)
priority
-
public void addReservation(float bw) throws LinkCapacityExceededException
LinkCapacityExceededException
public void addReservation(float bw, int priority) throws LinkCapacityExceededException
bw
- priority
-
LinkCapacityExceededException
public int getDiffServBCM()
public DiffServModel getDiffServModel()
public void removeReservation(float bw) throws LinkCapacityExceededException
bw
-
LinkCapacityExceededException
public void removeReservation(float bw, int priority) throws LinkCapacityExceededException
bw
- priority
-
LinkCapacityExceededException
public float[] getBCs()
public void setBC(int ct, float value) throws DiffServConfigurationException, LinkCapacityExceededException
ct
- class typevalue
-
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.public float[] getRbw()
public void setRbw(float[] rbw)
public void addPriority(int priority)
priority
- the priority that was added.public void removePriority(int priority)
priority
- public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void setElementId(java.lang.String id) throws IdException
DomainElement
setElementId
in interface DomainElement
IdException
public Domain getDomain()
DomainElement
getDomain
in interface DomainElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |