com.limegroup.gnutella.statistics
Class ConnectionStat

java.lang.Object
  extended bycom.limegroup.gnutella.statistics.AbstractStatistic
      extended bycom.limegroup.gnutella.statistics.AdvancedStatistic
          extended bycom.limegroup.gnutella.statistics.ConnectionStat
All Implemented Interfaces:
Statistic

public class ConnectionStat
extends com.limegroup.gnutella.statistics.AdvancedStatistic

This class handles all statistics for connections.


Field Summary
static Statistic ALL_CONNECTION_ATTEMPTS
          Statistic for all Gnutella connection attempts made.
static Statistic INCOMING_CONNECTION_ATTEMPTS
          Statistic for all Gnutella incoming connection attempts made (connection attempts initiated from other hosts).
static Statistic OUTGOING_CONNECTION_ATTEMPTS
          Statistic for all Gnutella outgoing connection attempts made (connection attempts initiated by us)..
 
Fields inherited from class com.limegroup.gnutella.statistics.AbstractStatistic
_buffer, _current, _fileName, _max, _total, _totalStatsRecorded, STATS_MANAGER
 
Fields inherited from interface com.limegroup.gnutella.statistics.Statistic
HISTORY_LENGTH
 
Method Summary
 void addData(int data)
          Add the specified number to the current recording for this statistic.
 void incrementStat()
          Increments this statistic by one.
 
Methods inherited from class com.limegroup.gnutella.statistics.AbstractStatistic
clearData, getAverage, getMax, getStatHistory, getTotal, initializeBuffer, setWriteStatToFile, storeCurrentStat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_CONNECTION_ATTEMPTS

public static final Statistic ALL_CONNECTION_ATTEMPTS
Statistic for all Gnutella connection attempts made.


INCOMING_CONNECTION_ATTEMPTS

public static final Statistic INCOMING_CONNECTION_ATTEMPTS
Statistic for all Gnutella incoming connection attempts made (connection attempts initiated from other hosts).


OUTGOING_CONNECTION_ATTEMPTS

public static final Statistic OUTGOING_CONNECTION_ATTEMPTS
Statistic for all Gnutella outgoing connection attempts made (connection attempts initiated by us)..

Method Detail

incrementStat

public void incrementStat()
Description copied from interface: Statistic
Increments this statistic by one.

Specified by:
incrementStat in interface Statistic
Overrides:
incrementStat in class AbstractStatistic

addData

public void addData(int data)
Description copied from interface: Statistic
Add the specified number to the current recording for this statistic. This is the equivalent of calling incrementStat data times.

Specified by:
addData in interface Statistic
Overrides:
addData in class AbstractStatistic