Class Bandwidth


  • public class Bandwidth
    extends java.lang.Object
    Bandwidth representation with a maximum bytes to read and write per period.
    • Constructor Detail

      • Bandwidth

        public Bandwidth​(Bandwidth.Period period,
                         long maxBytesRead,
                         long maxBytesWritten)
        Creates a Bandwidth instance.
        Parameters:
        period - the period over which the limit is applied.
        maxBytesRead - the maximum number of bytes read per period. A negative value means there is no limit.
        maxBytesWritten - the maximum number of bytes written per period. A negative value means there is no limit.
    • Method Detail

      • getReadBandwidthChecker

        public BandwidthChecker getReadBandwidthChecker()
        Read bandwidth getter.
        Returns:
        the bandwidth checker.
      • getWriteBandwidthChecker

        public BandwidthChecker getWriteBandwidthChecker()
        Write bandwidth getter.
        Returns:
        the bandwidth checker.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object