org.gudy.azureus2.core3.global.impl
Class GlobalManagerStatsImpl

java.lang.Object
  extended by org.gudy.azureus2.core3.global.impl.GlobalManagerStatsImpl
All Implemented Interfaces:
GlobalManagerStats, SimpleTimer.TimerTickReceiver

public class GlobalManagerStatsImpl
extends Object
implements GlobalManagerStats, SimpleTimer.TimerTickReceiver


Constructor Summary
protected GlobalManagerStatsImpl(GlobalManagerImpl _manager)
           
 
Method Summary
 void dataBytesReceived(int length, boolean LAN)
           
 void dataBytesSent(int length, boolean LAN)
           
 void discarded(int length)
           
 int getDataAndProtocolReceiveRate()
           
 int getDataAndProtocolSendRate()
           
 int getDataReceiveRate()
          Data Receive Rate over the last 10s
 int getDataReceiveRateNoLAN()
           
 int getDataReceiveRateNoLAN(int average_period)
           
 int getDataSendRate()
          Data Send Rate over the last 10s
 int getDataSendRateAtClose()
           
 int getDataSendRateNoLAN()
           
 int getDataSendRateNoLAN(int average_period)
           
 int getProtocolReceiveRate()
           
 int getProtocolReceiveRateNoLAN()
           
 int getProtocolReceiveRateNoLAN(int average_period)
           
 int getProtocolSendRate()
           
 int getProtocolSendRateNoLAN()
           
 int getProtocolSendRateNoLAN(int average_period)
           
 long getSmoothedReceiveRate()
          Smoothed Receive Rate, including data and protocol, based on "Stats Smoothing Secs" (default to 60s, min 30s)
 long getSmoothedSendRate()
          Smoothed Send Rate, including data and protocol, based on "Stats Smoothing Secs" (default to 60s, min 30s)
 long getTotalDataBytesReceived()
           
 long getTotalDataBytesSent()
           
 long getTotalDiscardedRaw()
           
 long getTotalProtocolBytesReceived()
           
 long getTotalProtocolBytesSent()
           
 long getTotalSwarmsPeerRate(boolean downloading, boolean seeding)
           
protected  void load()
           
 void protocolBytesReceived(int length, boolean LAN)
           
 void protocolBytesSent(int length, boolean LAN)
           
protected  void save()
           
 void tick(long mono_now, int tick_count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalManagerStatsImpl

protected GlobalManagerStatsImpl(GlobalManagerImpl _manager)
Method Detail

load

protected void load()

save

protected void save()

getDataSendRateAtClose

public int getDataSendRateAtClose()
Specified by:
getDataSendRateAtClose in interface GlobalManagerStats

discarded

public void discarded(int length)
Specified by:
discarded in interface GlobalManagerStats

dataBytesReceived

public void dataBytesReceived(int length,
                              boolean LAN)
Specified by:
dataBytesReceived in interface GlobalManagerStats

protocolBytesReceived

public void protocolBytesReceived(int length,
                                  boolean LAN)
Specified by:
protocolBytesReceived in interface GlobalManagerStats

dataBytesSent

public void dataBytesSent(int length,
                          boolean LAN)
Specified by:
dataBytesSent in interface GlobalManagerStats

protocolBytesSent

public void protocolBytesSent(int length,
                              boolean LAN)
Specified by:
protocolBytesSent in interface GlobalManagerStats

getDataReceiveRate

public int getDataReceiveRate()
Description copied from interface: GlobalManagerStats
Data Receive Rate over the last 10s

Specified by:
getDataReceiveRate in interface GlobalManagerStats

getDataReceiveRateNoLAN

public int getDataReceiveRateNoLAN()
Specified by:
getDataReceiveRateNoLAN in interface GlobalManagerStats

getDataReceiveRateNoLAN

public int getDataReceiveRateNoLAN(int average_period)
Specified by:
getDataReceiveRateNoLAN in interface GlobalManagerStats

getProtocolReceiveRate

public int getProtocolReceiveRate()
Specified by:
getProtocolReceiveRate in interface GlobalManagerStats

getProtocolReceiveRateNoLAN

public int getProtocolReceiveRateNoLAN()
Specified by:
getProtocolReceiveRateNoLAN in interface GlobalManagerStats

getProtocolReceiveRateNoLAN

public int getProtocolReceiveRateNoLAN(int average_period)
Specified by:
getProtocolReceiveRateNoLAN in interface GlobalManagerStats

getDataAndProtocolReceiveRate

public int getDataAndProtocolReceiveRate()
Specified by:
getDataAndProtocolReceiveRate in interface GlobalManagerStats

getDataSendRate

public int getDataSendRate()
Description copied from interface: GlobalManagerStats
Data Send Rate over the last 10s

Specified by:
getDataSendRate in interface GlobalManagerStats

getDataSendRateNoLAN

public int getDataSendRateNoLAN()
Specified by:
getDataSendRateNoLAN in interface GlobalManagerStats

getDataSendRateNoLAN

public int getDataSendRateNoLAN(int average_period)
Specified by:
getDataSendRateNoLAN in interface GlobalManagerStats

getProtocolSendRate

public int getProtocolSendRate()
Specified by:
getProtocolSendRate in interface GlobalManagerStats

getProtocolSendRateNoLAN

public int getProtocolSendRateNoLAN()
Specified by:
getProtocolSendRateNoLAN in interface GlobalManagerStats

getProtocolSendRateNoLAN

public int getProtocolSendRateNoLAN(int average_period)
Specified by:
getProtocolSendRateNoLAN in interface GlobalManagerStats

getDataAndProtocolSendRate

public int getDataAndProtocolSendRate()
Specified by:
getDataAndProtocolSendRate in interface GlobalManagerStats

getTotalDataBytesSent

public long getTotalDataBytesSent()
Specified by:
getTotalDataBytesSent in interface GlobalManagerStats

getTotalProtocolBytesSent

public long getTotalProtocolBytesSent()
Specified by:
getTotalProtocolBytesSent in interface GlobalManagerStats

getTotalDataBytesReceived

public long getTotalDataBytesReceived()
Specified by:
getTotalDataBytesReceived in interface GlobalManagerStats

getTotalProtocolBytesReceived

public long getTotalProtocolBytesReceived()
Specified by:
getTotalProtocolBytesReceived in interface GlobalManagerStats

getTotalDiscardedRaw

public long getTotalDiscardedRaw()

getTotalSwarmsPeerRate

public long getTotalSwarmsPeerRate(boolean downloading,
                                   boolean seeding)
Specified by:
getTotalSwarmsPeerRate in interface GlobalManagerStats

tick

public void tick(long mono_now,
                 int tick_count)
Specified by:
tick in interface SimpleTimer.TimerTickReceiver

getSmoothedSendRate

public long getSmoothedSendRate()
Description copied from interface: GlobalManagerStats
Smoothed Send Rate, including data and protocol, based on "Stats Smoothing Secs" (default to 60s, min 30s)

Specified by:
getSmoothedSendRate in interface GlobalManagerStats

getSmoothedReceiveRate

public long getSmoothedReceiveRate()
Description copied from interface: GlobalManagerStats
Smoothed Receive Rate, including data and protocol, based on "Stats Smoothing Secs" (default to 60s, min 30s)

Specified by:
getSmoothedReceiveRate in interface GlobalManagerStats