be.ac.ulg.montefiore.run.totem.repository.tomography.utils
Class LinkLoadData

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.repository.tomography.utils.LinkLoadData

public class LinkLoadData
extends java.lang.Object

Class that reprent all the data available about links. These data are collected from snmp There is no check on the validity of timeScale, only at the mapping of 0 is knowned

Creation date: 27-mars-2006

Author:
Quentin Chevalier (quentin.chevalier@gmail.com)

Constructor Summary
LinkLoadData(int nbLink, long start, int nbSample, int step)
           
 
Method Summary
 double[] getDomainMatrix(int stepFromBegining, Domain domain)
           
 double[] getDomainMatrix(long time, Domain domain)
           
 double getElement(int linkIndex, int index)
          Method to retreive the linkCount of the link linkName(index) at the time time
 double getElement(int linkIndex, long time)
          Method to retreive the linkCount of the link linkName(index) at the time time
 double getElement(java.lang.String linkName, int index)
          Method to retreive the linkCount of the link linkName at the time time
 double getElement(java.lang.String linkName, long time)
          Method to retreive the linkCount of the link linkName at the time time
 double getInAccess(int timeIndex)
           
 int getIndex(java.lang.String linkName)
           
 double getInPeering(int timeIndex)
           
 LinkData getLink(int linkIndex)
           
 LinkData getLink(java.lang.String linkName)
           
 java.lang.String getLinkId(int index)
           
 double[] getMatrix(int stepFromBegining)
           
 double[] getMatrix(long time)
           
 int getNbLink()
           
 int getNbSample()
           
 double getNodeLoadIn(java.lang.String nodeId, int index)
           
 double getOutAccess(int timeIndex)
           
 double getOutPeering(int timeIndex)
           
 long getStartTime()
           
 int getStep()
           
 boolean isIndexed(java.lang.String linkName)
           
 void print()
           
 void setNextLink(LinkData link)
          Add the link at the next position available in the structure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkLoadData

public LinkLoadData(int nbLink,
                    long start,
                    int nbSample,
                    int step)
Parameters:
nbLink - Number of links indexed
start - The value of the time index 0
end - The value of the time index nbLink (the last index in fact)
Method Detail

setNextLink

public void setNextLink(LinkData link)
                 throws NotYetImplementedException
Add the link at the next position available in the structure

Parameters:
link - The link added
Throws:
NotYetImplementedException

getLink

public LinkData getLink(java.lang.String linkName)
Parameters:
linkName - The id of the link we want to retreived
Returns:
A link

getLink

public LinkData getLink(int linkIndex)
Parameters:
linkIndex - The index of the link we want to retreived (for easier access)
Returns:
A link

getElement

public double getElement(java.lang.String linkName,
                         long time)
                  throws NotYetImplementedException
Method to retreive the linkCount of the link linkName at the time time

Parameters:
linkName - A string representing the id of the link
time - The time since epoch (1-jan-1970)
Returns:
The linkCount of the link linkName at the time time
Throws:
NotYetImplementedException

getElement

public double getElement(int linkIndex,
                         long time)
                  throws NotYetImplementedException
Method to retreive the linkCount of the link linkName(index) at the time time

Parameters:
linkIndex - The link index (for a more direct access)
time - The time since epoch (1-jan-1970)
Returns:
The load of the link linkName at the time time
Throws:
NotYetImplementedException

getElement

public double getElement(java.lang.String linkName,
                         int index)
                  throws NotYetImplementedException
Method to retreive the linkCount of the link linkName at the time time

Parameters:
linkName - A string representing the id of the link
index - The index of time expressed in integer (i.e. real time = index * step + startTime)
Returns:
The linkCount of the link linkName at the time time
Throws:
NotYetImplementedException

getElement

public double getElement(int linkIndex,
                         int index)
                  throws NotYetImplementedException
Method to retreive the linkCount of the link linkName(index) at the time time

Parameters:
linkIndex - The link index (for a more direct access)
index - The index of time expressed in integer (i.e. real time = index * step + startTime)
Returns:
The load of the link linkName at the time time
Throws:
NotYetImplementedException

getLinkId

public java.lang.String getLinkId(int index)
Parameters:
index - The index associated with the link we want to know
Returns:
The id of the link at index index

getIndex

public int getIndex(java.lang.String linkName)
Parameters:
linkName - The link we want to know the index
Returns:
The index of the link linkName

isIndexed

public boolean isIndexed(java.lang.String linkName)
Parameters:
linkName - The link we want to check the validity
Returns:
true if the link is indexed in the data structure

getMatrix

public double[] getMatrix(long time)
                   throws NotYetImplementedException
Parameters:
time - The time since epoch (1-jan-1970)
Returns:
A snmp linkLoad vector for the time time
Throws:
NotYetImplementedException

getMatrix

public double[] getMatrix(int stepFromBegining)
                   throws NotYetImplementedException
Parameters:
stepFromBegining - The time in term of index
Returns:
A snmp linkLoad vector for the time stepFromBegining
Throws:
NotYetImplementedException

getDomainMatrix

public double[] getDomainMatrix(long time,
                                Domain domain)
                         throws NotYetImplementedException
Parameters:
time - The time since epoch (1-jan-1970)
domain - the domain where we compute the linkload
Returns:
A snmp linkLoad vector for the time time with only link in the domain
Throws:
NotYetImplementedException

getDomainMatrix

public double[] getDomainMatrix(int stepFromBegining,
                                Domain domain)
                         throws NotYetImplementedException
Parameters:
stepFromBegining - The time in term of index
domain - the domain where we compute the linkload
Returns:
A snmp linkLoad vector for the time stepFromBegining with only link in the domain
Throws:
NotYetImplementedException

getNbSample

public int getNbSample()
Returns:
The number of sample of snmp Data

getNbLink

public int getNbLink()
Returns:
The number of link

getStartTime

public long getStartTime()
Returns:
Return the startTime.

getStep

public int getStep()
Returns:
Return the step.

getInAccess

public double getInAccess(int timeIndex)
Returns:
Return the sum of all incoming traffic in the network at access Links

getInPeering

public double getInPeering(int timeIndex)
Returns:
Return the sum of all incoming traffic in the network at peering Links

getOutAccess

public double getOutAccess(int timeIndex)
Returns:
Return the sum of all exiting traffic in the network at access Links

getOutPeering

public double getOutPeering(int timeIndex)
Returns:
Return the sum of all exiting traffic in the network at peering Links

print

public void print()

getNodeLoadIn

public double getNodeLoadIn(java.lang.String nodeId,
                            int index)
                     throws NotYetImplementedException
Throws:
NotYetImplementedException


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