Package org.torproject.descriptor
Interface BandwidthHistory
- 
- All Superinterfaces:
- java.io.Serializable
 
 public interface BandwidthHistory extends java.io.SerializableContains the bandwidth history of a relay or bridge.A bandwidth history is not a descriptor type of its own but usually part of extra-info descriptors ( ExtraInfoDescriptor) or server descriptors (ServerDescriptor).- Since:
- 1.0.0
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.SortedMap<java.lang.Long,java.lang.Long>getBandwidthValues()Return the (possibly empty) bandwidth history with map keys being times in milliseconds since the epoch when intervals end and map values being number of bytes used in the interval, ordered from oldest to newest interval.longgetHistoryEndMillis()Return the time in milliseconds since the epoch when the most recent interval ends.longgetIntervalLength()Return the interval length in seconds.java.lang.StringgetLine()Return the original bandwidth history line as contained in the descriptor, possibly prefixed with"opt ".
 
- 
- 
- 
Method Detail- 
getLinejava.lang.String getLine() Return the original bandwidth history line as contained in the descriptor, possibly prefixed with"opt ".- Since:
- 1.0.0
 
 - 
getHistoryEndMillislong getHistoryEndMillis() Return the time in milliseconds since the epoch when the most recent interval ends.- Since:
- 1.0.0
 
 - 
getIntervalLengthlong getIntervalLength() Return the interval length in seconds.- Since:
- 1.0.0
 
 - 
getBandwidthValuesjava.util.SortedMap<java.lang.Long,java.lang.Long> getBandwidthValues() Return the (possibly empty) bandwidth history with map keys being times in milliseconds since the epoch when intervals end and map values being number of bytes used in the interval, ordered from oldest to newest interval.- Since:
- 1.0.0
 
 
- 
 
-