|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.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 LinkLoadComputer
listener
- public void removeListener(LinkLoadComputerListener listener)
removeListener
in interface LinkLoadComputer
listener
- public java.lang.String getId() throws LinkLoadComputerIdException
LinkLoadComputer
getId
in interface LinkLoadComputer
LinkLoadComputerIdException
- id the Id was not setpublic void setId(java.lang.String id) throws LinkLoadComputerIdException
LinkLoadComputer
setId
in interface LinkLoadComputer
LinkLoadComputerIdException
- if the id was already setpublic boolean isSetId()
LinkLoadComputer
isSetId
in interface LinkLoadComputer
public void unsetId()
LinkLoadComputer
unsetId
in interface LinkLoadComputer
public double[] getLoad() throws DataConsistencyException, NoRouteToHostException, RoutingException
LinkLoadComputer
getLoad
in interface LinkLoadComputer
DataConsistencyException
NoRouteToHostException
RoutingException
public double getLoad(Link lnk) throws LinkNotFoundException, DataConsistencyException, NoRouteToHostException, RoutingException
LinkLoadComputer
getLoad
in interface LinkLoadComputer
LinkNotFoundException
DataConsistencyException
NoRouteToHostException
RoutingException
public double[] getUtilization() throws DataConsistencyException, NoRouteToHostException, RoutingException
LinkLoadComputer
getUtilization
in interface LinkLoadComputer
DataConsistencyException
NoRouteToHostException
RoutingException
public double getUtilization(Link lnk) throws LinkNotFoundException, DataConsistencyException, NoRouteToHostException, RoutingException
LinkLoadComputer
getUtilization
in interface LinkLoadComputer
LinkNotFoundException
DataConsistencyException
NoRouteToHostException
RoutingException
public Domain getDomain()
LinkLoadComputer
getDomain
in interface LinkLoadComputer
public TmLoadComputer getLoadComputer()
LinkLoadComputer
getLoadComputer
in interface LinkLoadComputer
public TrafficMatrix getTrafficMatrix()
LinkLoadComputer
getTrafficMatrix
in interface LinkLoadComputer
public boolean isConsistent()
LinkLoadComputer
isConsistent
in interface LinkLoadComputer
public java.lang.String getShortName()
LinkLoadComputer
getShortName
in interface LinkLoadComputer
public void destroy()
LinkLoadComputer
destroy
in interface LinkLoadComputer
public boolean equals(java.lang.Object o)
equals
in interface LinkLoadComputer
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface LinkLoadComputer
hashCode
in class java.lang.Object
public void addNodeEvent(Node node)
DomainChangeListener
addNodeEvent
in interface DomainChangeListener
public void removeNodeEvent(Node node)
DomainChangeListener
removeNodeEvent
in interface DomainChangeListener
public void nodeStatusChangeEvent(Node node)
DomainChangeListener
nodeStatusChangeEvent
in interface DomainChangeListener
public void nodeLocationChangeEvent(Node node)
DomainChangeListener
nodeLocationChangeEvent
in interface DomainChangeListener
public void addLinkEvent(Link link)
DomainChangeListener
addLinkEvent
in interface DomainChangeListener
public void removeLinkEvent(Link link)
DomainChangeListener
removeLinkEvent
in interface DomainChangeListener
public void linkStatusChangeEvent(Link link)
DomainChangeListener
linkStatusChangeEvent
in interface DomainChangeListener
public void linkMetricChangeEvent(Link link)
DomainChangeListener
linkMetricChangeEvent
in interface DomainChangeListener
public void linkTeMetricChangeEvent(Link link)
DomainChangeListener
linkTeMetricChangeEvent
in interface DomainChangeListener
public void linkBandwidthChangeEvent(Link link)
DomainChangeListener
linkBandwidthChangeEvent
in interface DomainChangeListener
public void linkReservedBandwidthChangeEvent(Link link)
DomainChangeListener
linkReservedBandwidthChangeEvent
in interface DomainChangeListener
public void linkDelayChangeEvent(Link link)
DomainChangeListener
linkDelayChangeEvent
in interface DomainChangeListener
public void addLspEvent(Lsp lsp)
DomainChangeListener
addLspEvent
in interface DomainChangeListener
public void removeLspEvent(Lsp lsp)
DomainChangeListener
removeLspEvent
in interface DomainChangeListener
public void rerouteLspEvent(Lsp lsp)
DomainChangeListener
rerouteLspEvent
in interface DomainChangeListener
lsp
- The LSP to reroute.public void lspReservationChangeEvent(Lsp lsp)
DomainChangeListener
lspReservationChangeEvent
in interface DomainChangeListener
public void lspWorkingPathChangeEvent(Lsp lsp)
DomainChangeListener
lspWorkingPathChangeEvent
in interface DomainChangeListener
public void elementChangeEvent(java.lang.String src, java.lang.String dst)
TrafficMatrixChangeListener
src
to node dst
.
elementChangeEvent
in interface TrafficMatrixChangeListener
public 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 |