Class ExtrapolatedHidServStats
- java.lang.Object
-
- org.torproject.metrics.stats.hidserv.ExtrapolatedHidServStats
-
- All Implemented Interfaces:
Document
public class ExtrapolatedHidServStats extends java.lang.Object implements Document
Extrapolated network totals of hidden-service statistics reported by a single relay. Extrapolated values are based on reported statistics and computed network fractions in the statistics interval.
-
-
Constructor Summary
Constructors Constructor Description ExtrapolatedHidServStats(long statsDateMillis, java.lang.String fingerprint)
Instantiates a new stats object using fingerprint and statistics interval end date which together uniquely identify the object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object otherObject)
Returns whether this object contains the same fingerprint and statistics interval end date as the passed object.java.lang.String[]
format()
Returns a string representation of this object, consisting of the statistics interval end date and the concatenation of all other attributes.double
getExtrapolatedDirOnionsSeen()
double
getExtrapolatedRendRelayedCells()
java.lang.String
getFingerprint()
double
getFractionDirOnionsSeen()
double
getFractionRendRelayedCells()
long
getStatsDateMillis()
int
hashCode()
Returns a (hopefully unique) hash code based on this object's fingerprint and statistics interval end date.boolean
parse(java.lang.String[] formattedStrings)
Initializes this stats object using the two provided strings that have been produced by the format method earlier and returns whether this operation was successful.void
setExtrapolatedDirOnionsSeen(double extrapolatedDirOnionsSeen)
void
setExtrapolatedRendRelayedCells(double extrapolatedRendRelayedCells)
void
setFractionDirOnionsSeen(double fractionDirOnionsSeen)
void
setFractionRendRelayedCells(double fractionRendRelayedCells)
-
-
-
Method Detail
-
getStatsDateMillis
public long getStatsDateMillis()
-
getFingerprint
public java.lang.String getFingerprint()
-
setExtrapolatedRendRelayedCells
public void setExtrapolatedRendRelayedCells(double extrapolatedRendRelayedCells)
-
getExtrapolatedRendRelayedCells
public double getExtrapolatedRendRelayedCells()
-
setFractionRendRelayedCells
public void setFractionRendRelayedCells(double fractionRendRelayedCells)
-
getFractionRendRelayedCells
public double getFractionRendRelayedCells()
-
setExtrapolatedDirOnionsSeen
public void setExtrapolatedDirOnionsSeen(double extrapolatedDirOnionsSeen)
-
getExtrapolatedDirOnionsSeen
public double getExtrapolatedDirOnionsSeen()
-
setFractionDirOnionsSeen
public void setFractionDirOnionsSeen(double fractionDirOnionsSeen)
-
getFractionDirOnionsSeen
public double getFractionDirOnionsSeen()
-
equals
public boolean equals(java.lang.Object otherObject)
Returns whether this object contains the same fingerprint and statistics interval end date as the passed object.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Returns a (hopefully unique) hash code based on this object's fingerprint and statistics interval end date.- Overrides:
hashCode
in classjava.lang.Object
-
format
public java.lang.String[] format()
Returns a string representation of this object, consisting of the statistics interval end date and the concatenation of all other attributes.
-
-