org.openflow.gui.stats
Class PortStats

java.lang.Object
  extended by org.openflow.gui.stats.PortStats
Direct Known Subclasses:
PortStatsRates

public class PortStats
extends java.lang.Object

Specifies statistics being gathered and their latest values.

Author:
David Underhill

Field Summary
protected  long numBytes
          Number of bytes in flows.
protected  int numFlows
          Number of flows.
protected  long numPackets
          Number of packets in flows.
protected  long updateTime
          when these stats were last updated
 
Constructor Summary
PortStats(Match m)
          Constructs a LinkStats to track stats for a specified match.
 
Method Summary
 long getByteCount()
          returns the current byte count
 int getFlowCount()
          returns the current flow count
 long getLastUpdateTime()
          returns the last update time
 long getPacketCount()
          returns the current packet count
 java.lang.String toString()
           
 void update(AggregateStatsReply r)
          update the statistics with those contained in r
 void update(long packetCount, long byteCount, int flowCount)
          Update the statistics with the specified values (the statistics are assumed to have been collected at the current time).
 void update(long packetCount, long byteCount, int flowCount, long when)
          update the statistics with the specified values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numPackets

protected long numPackets
Number of packets in flows.


numBytes

protected long numBytes
Number of bytes in flows.


numFlows

protected int numFlows
Number of flows.


updateTime

protected long updateTime
when these stats were last updated

Constructor Detail

PortStats

public PortStats(Match m)
Constructs a LinkStats to track stats for a specified match.

Method Detail

getPacketCount

public long getPacketCount()
returns the current packet count


getByteCount

public long getByteCount()
returns the current byte count


getFlowCount

public int getFlowCount()
returns the current flow count


getLastUpdateTime

public long getLastUpdateTime()
returns the last update time


update

public final void update(AggregateStatsReply r)
update the statistics with those contained in r


update

public final void update(long packetCount,
                         long byteCount,
                         int flowCount)
Update the statistics with the specified values (the statistics are assumed to have been collected at the current time).


update

public void update(long packetCount,
                   long byteCount,
                   int flowCount,
                   long when)
update the statistics with the specified values


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object