Interface BandwidthHistory

  • All Superinterfaces:
    java.io.Serializable

    public interface BandwidthHistory
    extends java.io.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

      All 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.
      long getHistoryEndMillis()
      Return the time in milliseconds since the epoch when the most recent interval ends.
      long getIntervalLength()
      Return the interval length in seconds.
      java.lang.String getLine()
      Return the original bandwidth history line as contained in the descriptor, possibly prefixed with "opt ".
    • Method Detail

      • getLine

        java.lang.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

        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.
        Since:
        1.0.0