Package org.torproject.descriptor
Interface BandwidthHistory
- All Superinterfaces:
Serializable
Contains 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 Summary
Modifier and TypeMethodDescriptionReturn 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.long
Return the time in milliseconds since the epoch when the most recent interval ends.long
Return the interval length in seconds.getLine()
Return the original bandwidth history line as contained in the descriptor, possibly prefixed with"opt "
.
-
Method Details
-
getLine
String getLine()Return the original bandwidth history line as contained in the descriptor, possibly prefixed with"opt "
.- Since:
- 1.0.0
-
getHistoryEndMillis
long getHistoryEndMillis()Return the time in milliseconds since the epoch when the most recent interval ends.- Since:
- 1.0.0
-
getIntervalLength
long getIntervalLength()Return the interval length in seconds.- Since:
- 1.0.0
-
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
-