|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.LinkLoadComputerImpl
public class LinkLoadComputerImpl
Calculates the links load and utilization of a given domain thanks to a TmLoadComputer and a traffic matrix. It listens to domain events and traffic Matrix events to maintain the calculated load up-to-date.
Creation date: 10 mars 2006
| Constructor Summary | |
|---|---|
LinkLoadComputerImpl(Domain domain,
TmLoadComputer tmlc,
TrafficMatrix tm)
|
|
| Method Summary | |
|---|---|
void |
addLinkEvent(Link link)
Notify a add link event |
void |
addListener(LinkLoadComputerListener listener)
Add a listener. |
void |
addLspEvent(Lsp lsp)
Notify a add LSP event |
void |
addNodeEvent(Node node)
Notify a add node event |
void |
destroy()
Free resources associated with the object. |
void |
elementChangeEvent(java.lang.String src,
java.lang.String dst)
Notify a change in the value of the source-destination pair from node src to node dst. |
boolean |
equals(java.lang.Object o)
|
Domain |
getDomain()
Returns the domain associated. |
java.lang.String |
getId()
Returns the id associated with the instance, if it has been set. |
double[] |
getLoad()
Returns a vector that represent links load. |
double |
getLoad(Link lnk)
Returns the load calculated for the given link. |
TmLoadComputer |
getLoadComputer()
Returns the associated routing strategy. |
java.lang.String |
getShortName()
Return a string representing the parameters in short. |
TrafficMatrix |
getTrafficMatrix()
Returns the traffic matrix. |
double[] |
getUtilization()
Returns a vector that represent links utilization. |
double |
getUtilization(Link lnk)
Returns the utilization calculated for the given link. |
int |
hashCode()
|
boolean |
isConsistent()
return true if the object is consistent (not yet destroyed). |
boolean |
isSetId()
returns true if the id has been set |
void |
linkBandwidthChangeEvent(Link link)
Notify a link bandwidth change event |
void |
linkDelayChangeEvent(Link link)
Notify a link delay change event |
void |
linkMetricChangeEvent(Link link)
Notify a link metric change event |
void |
linkReservedBandwidthChangeEvent(Link link)
Notify a link reserved bandwidth change event |
void |
linkStatusChangeEvent(Link link)
Notify a link status change event |
void |
linkTeMetricChangeEvent(Link link)
Notify a link TE metric change event |
void |
lspReservationChangeEvent(Lsp lsp)
Notify a LSP reservation change event |
void |
lspWorkingPathChangeEvent(Lsp lsp)
Notify a change in the working path of the lsp. |
void |
nodeLocationChangeEvent(Node node)
Notify a node location change event |
void |
nodeStatusChangeEvent(Node node)
Notify a node status change event |
void |
removeLinkEvent(Link link)
Notify a remove link event |
void |
removeListener(LinkLoadComputerListener listener)
Remove a listener. |
void |
removeLspEvent(Lsp lsp)
Notify a remove LSP event |
void |
removeNodeEvent(Node node)
Notify a remove node event |
void |
rerouteLspEvent(Lsp lsp)
Notify the fact that a LSP must be rerouted. |
void |
setId(java.lang.String id)
Sets the id of the LinkLoadComputer |
java.lang.String |
toString()
|
void |
unsetId()
unsets the id |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LinkLoadComputerImpl(Domain domain,
TmLoadComputer tmlc,
TrafficMatrix tm)
throws DataConsistencyException
DataConsistencyException| Method Detail |
|---|
public void addListener(LinkLoadComputerListener listener)
addListener in interface LinkLoadComputerlistener - public void removeListener(LinkLoadComputerListener listener)
removeListener in interface LinkLoadComputerlistener -
public java.lang.String getId()
throws LinkLoadComputerIdException
LinkLoadComputer
getId in interface LinkLoadComputerLinkLoadComputerIdException - id the Id was not set
public void setId(java.lang.String id)
throws LinkLoadComputerIdException
LinkLoadComputer
setId in interface LinkLoadComputerLinkLoadComputerIdException - if the id was already setpublic boolean isSetId()
LinkLoadComputer
isSetId in interface LinkLoadComputerpublic void unsetId()
LinkLoadComputer
unsetId in interface LinkLoadComputer
public double[] getLoad()
throws DataConsistencyException,
NoRouteToHostException,
RoutingException
LinkLoadComputer
getLoad in interface LinkLoadComputerDataConsistencyException
NoRouteToHostException
RoutingException
public double getLoad(Link lnk)
throws LinkNotFoundException,
DataConsistencyException,
NoRouteToHostException,
RoutingException
LinkLoadComputer
getLoad in interface LinkLoadComputerLinkNotFoundException
DataConsistencyException
NoRouteToHostException
RoutingException
public double[] getUtilization()
throws DataConsistencyException,
NoRouteToHostException,
RoutingException
LinkLoadComputer
getUtilization in interface LinkLoadComputerDataConsistencyException
NoRouteToHostException
RoutingException
public double getUtilization(Link lnk)
throws LinkNotFoundException,
DataConsistencyException,
NoRouteToHostException,
RoutingException
LinkLoadComputer
getUtilization in interface LinkLoadComputerLinkNotFoundException
DataConsistencyException
NoRouteToHostException
RoutingExceptionpublic Domain getDomain()
LinkLoadComputer
getDomain in interface LinkLoadComputerpublic TmLoadComputer getLoadComputer()
LinkLoadComputer
getLoadComputer in interface LinkLoadComputerpublic TrafficMatrix getTrafficMatrix()
LinkLoadComputer
getTrafficMatrix in interface LinkLoadComputerpublic boolean isConsistent()
LinkLoadComputer
isConsistent in interface LinkLoadComputerpublic java.lang.String getShortName()
LinkLoadComputer
getShortName in interface LinkLoadComputerpublic void destroy()
LinkLoadComputer
destroy in interface LinkLoadComputerpublic boolean equals(java.lang.Object o)
equals in interface LinkLoadComputerequals in class java.lang.Objectpublic int hashCode()
hashCode in interface LinkLoadComputerhashCode in class java.lang.Objectpublic void addNodeEvent(Node node)
DomainChangeListener
addNodeEvent in interface DomainChangeListenerpublic void removeNodeEvent(Node node)
DomainChangeListener
removeNodeEvent in interface DomainChangeListenerpublic void nodeStatusChangeEvent(Node node)
DomainChangeListener
nodeStatusChangeEvent in interface DomainChangeListenerpublic void nodeLocationChangeEvent(Node node)
DomainChangeListener
nodeLocationChangeEvent in interface DomainChangeListenerpublic void addLinkEvent(Link link)
DomainChangeListener
addLinkEvent in interface DomainChangeListenerpublic void removeLinkEvent(Link link)
DomainChangeListener
removeLinkEvent in interface DomainChangeListenerpublic void linkStatusChangeEvent(Link link)
DomainChangeListener
linkStatusChangeEvent in interface DomainChangeListenerpublic void linkMetricChangeEvent(Link link)
DomainChangeListener
linkMetricChangeEvent in interface DomainChangeListenerpublic void linkTeMetricChangeEvent(Link link)
DomainChangeListener
linkTeMetricChangeEvent in interface DomainChangeListenerpublic void linkBandwidthChangeEvent(Link link)
DomainChangeListener
linkBandwidthChangeEvent in interface DomainChangeListenerpublic void linkReservedBandwidthChangeEvent(Link link)
DomainChangeListener
linkReservedBandwidthChangeEvent in interface DomainChangeListenerpublic void linkDelayChangeEvent(Link link)
DomainChangeListener
linkDelayChangeEvent in interface DomainChangeListenerpublic void addLspEvent(Lsp lsp)
DomainChangeListener
addLspEvent in interface DomainChangeListenerpublic void removeLspEvent(Lsp lsp)
DomainChangeListener
removeLspEvent in interface DomainChangeListenerpublic void rerouteLspEvent(Lsp lsp)
DomainChangeListener
rerouteLspEvent in interface DomainChangeListenerlsp - The LSP to reroute.public void lspReservationChangeEvent(Lsp lsp)
DomainChangeListener
lspReservationChangeEvent in interface DomainChangeListenerpublic void lspWorkingPathChangeEvent(Lsp lsp)
DomainChangeListener
lspWorkingPathChangeEvent in interface DomainChangeListener
public void elementChangeEvent(java.lang.String src,
java.lang.String dst)
TrafficMatrixChangeListenersrc to node dst.
elementChangeEvent in interface TrafficMatrixChangeListenerpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||