com.limegroup.gnutella.statistics
Class DownloadStat

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

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

This class contains a type-safe enumeration of statistics for downloads.


Field Summary
static Statistic ALTERNATE_COLLECTED
          Statistic for the number of alternate locations that we have succesfully read from the network which we will possibly use for this download.
static Statistic ALTERNATE_NOT_ADDED
          Statistic for the number of alternate locations that did not work.
static Statistic ALTERNATE_WORKED
          Statistic for the number of Alternate Locations that we got off the network which actually worked
static Statistic CONNECT_DIRECT_FAILURES
          Statistic for direct connection attempts that failed.
static Statistic CONNECT_DIRECT_SUCCESS
          Statistic for direct connection attempts that succeeded.
static Statistic CONNECT_PUSH_SUCCESS
          Statistic for pushed connection attempts that succeeded.
static Statistic CONNECTION_ATTEMPTS
          Statistic for direct connection attempts.
static Statistic FAILED_HTTP10
          Statistic for the number of failed HTTP1.0 transfers.
static Statistic FAILED_HTTP11
          Statistic for the number of failed HTTP1.1 chunk downloads.
static Statistic FNF_EXCEPTION
          Statistic for the number of file not found download responses.
static Statistic IO_EXCEPTION
          Statistic for the number of IOExceptions while downloading.
static Statistic NS_EXCEPTION
          Statistic for the number of not sharing download responses.
static Statistic NSE_EXCEPTION
          Statistic for attempting to steal from a grey area of another downloader when no such grey area existed.
static Statistic NSR_EXCEPTION
          Statistic for the number of NoSuchRangeExceptions while downloading.
static Statistic PRH_EXCEPTION
          Statistic for the number of ProblemReadingHeader exceptions while downloading.
static Statistic PUSH_FAILURE_INTERRUPTED
          Statistic for pushed connection attempts that failed because we were interrupted for some reason.
static Statistic PUSH_FAILURE_LOST
          Statistics for pushed connection attempts that failed because the socket connection was lost between the time we connected and the time we attempted to retrieve the output stream.
static Statistic PUSH_FAILURE_NO_RESPONSE
          Statistic for pushed connection attempts that failed because we didn't receive a GIV from the pushee after a certain time.
static Statistic PUSH_FAILURE_NO_ROUTE
          Statistic for pushed connection attempts that failed because we didn't have the push route stored.
static Statistic Q_EXCEPTION
          Statistic for the number of queued download responses.
static Statistic RESPONSE_OK
          Statistic for the number of 'ok' responses while downloading.
static Statistic RETRIED_SUCCESS
          Statistic for the number of once failed sources that are now working.
static Statistic RNA_EXCEPTION
          Statistic for the number of range not available download responses.
static Statistic SUCCESFULL_HTTP10
          Statistic for the number of succesfully download HTTP1.0 transfers.
static Statistic SUCCESFULL_HTTP11
          Statistic for the number of succesfully downloaded HTTP1.1 chunks.
static Statistic TAL_EXCEPTION
          Statistic for the number of busy download responses.
static Statistic UNKNOWN_CODE_EXCEPTION
          Statistic for the number of Unknown Codes from download responses.
 
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

CONNECTION_ATTEMPTS

public static final Statistic CONNECTION_ATTEMPTS
Statistic for direct connection attempts. (This cannot be automatically increment by the below connection stats because they are performed multiple times per host.)


CONNECT_DIRECT_SUCCESS

public static final Statistic CONNECT_DIRECT_SUCCESS
Statistic for direct connection attempts that succeeded.


CONNECT_DIRECT_FAILURES

public static final Statistic CONNECT_DIRECT_FAILURES
Statistic for direct connection attempts that failed.


CONNECT_PUSH_SUCCESS

public static final Statistic CONNECT_PUSH_SUCCESS
Statistic for pushed connection attempts that succeeded.


PUSH_FAILURE_INTERRUPTED

public static final Statistic PUSH_FAILURE_INTERRUPTED
Statistic for pushed connection attempts that failed because we were interrupted for some reason.


PUSH_FAILURE_NO_ROUTE

public static final Statistic PUSH_FAILURE_NO_ROUTE
Statistic for pushed connection attempts that failed because we didn't have the push route stored.


PUSH_FAILURE_NO_RESPONSE

public static final Statistic PUSH_FAILURE_NO_RESPONSE
Statistic for pushed connection attempts that failed because we didn't receive a GIV from the pushee after a certain time.


PUSH_FAILURE_LOST

public static final Statistic PUSH_FAILURE_LOST
Statistics for pushed connection attempts that failed because the socket connection was lost between the time we connected and the time we attempted to retrieve the output stream.


NSE_EXCEPTION

public static final Statistic NSE_EXCEPTION
Statistic for attempting to steal from a grey area of another downloader when no such grey area existed.


TAL_EXCEPTION

public static final Statistic TAL_EXCEPTION
Statistic for the number of busy download responses.


RNA_EXCEPTION

public static final Statistic RNA_EXCEPTION
Statistic for the number of range not available download responses.


FNF_EXCEPTION

public static final Statistic FNF_EXCEPTION
Statistic for the number of file not found download responses.


NS_EXCEPTION

public static final Statistic NS_EXCEPTION
Statistic for the number of not sharing download responses.


Q_EXCEPTION

public static final Statistic Q_EXCEPTION
Statistic for the number of queued download responses.


PRH_EXCEPTION

public static final Statistic PRH_EXCEPTION
Statistic for the number of ProblemReadingHeader exceptions while downloading.


UNKNOWN_CODE_EXCEPTION

public static final Statistic UNKNOWN_CODE_EXCEPTION
Statistic for the number of Unknown Codes from download responses.


IO_EXCEPTION

public static final Statistic IO_EXCEPTION
Statistic for the number of IOExceptions while downloading.


NSR_EXCEPTION

public static final Statistic NSR_EXCEPTION
Statistic for the number of NoSuchRangeExceptions while downloading.


RESPONSE_OK

public static final Statistic RESPONSE_OK
Statistic for the number of 'ok' responses while downloading.


ALTERNATE_COLLECTED

public static final Statistic ALTERNATE_COLLECTED
Statistic for the number of alternate locations that we have succesfully read from the network which we will possibly use for this download.


ALTERNATE_NOT_ADDED

public static final Statistic ALTERNATE_NOT_ADDED
Statistic for the number of alternate locations that did not work.


ALTERNATE_WORKED

public static final Statistic ALTERNATE_WORKED
Statistic for the number of Alternate Locations that we got off the network which actually worked


SUCCESFULL_HTTP11

public static final Statistic SUCCESFULL_HTTP11
Statistic for the number of succesfully downloaded HTTP1.1 chunks.


SUCCESFULL_HTTP10

public static final Statistic SUCCESFULL_HTTP10
Statistic for the number of succesfully download HTTP1.0 transfers.


FAILED_HTTP11

public static final Statistic FAILED_HTTP11
Statistic for the number of failed HTTP1.1 chunk downloads.


FAILED_HTTP10

public static final Statistic FAILED_HTTP10
Statistic for the number of failed HTTP1.0 transfers.


RETRIED_SUCCESS

public static final Statistic RETRIED_SUCCESS
Statistic for the number of once failed sources that are now working.

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