|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TrafficMatrix
This class represents a traffic matrix.
Creation date: 27-janv.-2005
| Nested Class Summary | |
|---|---|
static interface |
TrafficMatrix.TrafficMatrixElem
Represents an element of the traffic matrix. |
| Method Summary | |
|---|---|
float |
get(int src,
int dst)
Returns the amount of traffic exchanged by the nodes src and dst. |
float |
get(java.lang.String src,
java.lang.String dst)
Returns the amount of traffic exchanged by the nodes src and dst. |
int |
getASID()
Returns the AS ID of the traffic matrix. |
java.util.Calendar |
getDate()
Get the date of matrix measurement |
double |
getDuration()
Get the matrix measurement duration |
double[] |
getLinkLoad()
Deprecated. Use class LinkLoadComputer instead. |
LinkLoadStrategy |
getLinkLoadStrategy()
Deprecated. Use class LinkLoadComputer instead. |
double[] |
getLinkUtilisation()
Deprecated. Use class LinkLoadComputer instead. |
TrafficMatrixChangeObserver |
getObserver()
Get the change observer. |
int |
getTmId()
Returns the id associated with the traffic matrix if it has already been set. |
BandwidthUnit |
getUnit()
returns the unit used in the matrix representation |
boolean |
isSetTmId()
Returns true if the id had been set |
java.util.Iterator<TrafficMatrix.TrafficMatrixElem> |
iterator()
Returns an iterator over the elements in this traffic matrix. |
void |
set(int src,
int dst,
float value)
Sets the amount of traffic exchanged by the nodes src and dst. |
void |
set(java.lang.String src,
java.lang.String dst,
float value)
Sets the amount of traffic exchanged by the nodes src and dst. |
void |
setDate(java.util.Calendar date)
Set the date of matrix measurement |
void |
setDuration(double duration)
Set the matrix measurement duration |
void |
setLinkLoadStrategy(LinkLoadStrategy strategy)
Deprecated. Use class LinkLoadComputer instead. |
void |
setTmId(int tmId)
Associate an id with the matrix if it not already set. |
void |
setUnit(BandwidthUnit unit)
This function sets the unit of the matrix representation. |
float[] |
toOneDimensionalArray()
Returns an array representing the matrix in one-dimensional form. |
float[][] |
toTwoDimensionalArray()
Returns a float array representing the traffic matrix. |
void |
unsetTmId()
Clear the Tm Id associated with the matrix. |
| Method Detail |
|---|
TrafficMatrixChangeObserver getObserver()
int getTmId()
throws TrafficMatrixIdException
TrafficMatrixIdException - if the id has not been set.
void setTmId(int tmId)
throws TrafficMatrixIdException
unsetTmId() to reset the tm id.
TrafficMatrixIdException - if the id has already been set.boolean isSetTmId()
void unsetTmId()
int getASID()
BandwidthUnit getUnit()
void setUnit(BandwidthUnit unit)
IllegalAccessError will be thrown.
unit - java.util.Calendar getDate()
void setDate(java.util.Calendar date)
date - the date of matrix measurementdouble getDuration()
void setDuration(double duration)
duration - the matrix measurement durationjava.util.Iterator<TrafficMatrix.TrafficMatrixElem> iterator()
remove operation.
iterator in interface java.lang.Iterable
float get(java.lang.String src,
java.lang.String dst)
throws NodeNotFoundException
src and dst.
src - The source node.dst - The destination node.
src and dst.
NodeNotFoundException - If there is no node src or no node dst.
float get(int src,
int dst)
throws NodeNotFoundException
src and dst.
src - The source node.dst - The destination node.
src and dst.
NodeNotFoundException - If there is no node src or no node dst.
void set(java.lang.String src,
java.lang.String dst,
float value)
throws NodeNotFoundException
src and dst.
src - The source node.dst - The destination node.value - The amount of traffic.
NodeNotFoundException - If there is no node src or no node dst.
void set(int src,
int dst,
float value)
throws NodeNotFoundException
src and dst.
src - The source node.dst - The destination node.value - The amount of traffic.
NodeNotFoundException - If there is no node src or no node dst.float[] toOneDimensionalArray()
domain.getConvertor.getNodeId(srcId)*domain.getConvertor.getMaxNodeId()+domain.getConvertor.getNodeId(dstId)
in the resulting array.
float[][] toTwoDimensionalArray()
[domain.getConvertor.getNodeId(srcId)][domain.getConvertor.getNodeId(dstId)].
@Deprecated void setLinkLoadStrategy(LinkLoadStrategy strategy)
LinkLoadComputer instead.
strategy - the link load computation strategy@Deprecated LinkLoadStrategy getLinkLoadStrategy()
LinkLoadComputer instead.
@Deprecated
double[] getLinkLoad()
throws NoRouteToHostException,
RoutingException
LinkLoadComputer instead.
ret be the returned array. ret[i] is the
load of the link InterDomainManager.getInstance().getDomain(this.getASID()).getConvertor().getLinkId(i).
NoRouteToHostException - If there is no route between a pair of nodes.
RoutingException - if an error occurred during the routing process.
@Deprecated
double[] getLinkUtilisation()
throws NoRouteToHostException,
RoutingException
LinkLoadComputer instead.
ret be the returned array. ret[i] is the
utilisation of the link InterDomainManager.getInstance().getDomain(this.getASID()).getConvertor().getLinkId(i).
NoRouteToHostException - if there is no route between a pair of nodes.
RoutingException - if an error occurred during the routing process.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||