Package com.microej.kf.util.control.net
Class Bandwidth
- java.lang.Object
-
- com.microej.kf.util.control.net.Bandwidth
-
public class Bandwidth extends java.lang.ObjectBandwidth representation with a maximum bytes to read and write per period.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBandwidth.Period
-
Constructor Summary
Constructors Constructor Description Bandwidth(Bandwidth.Period period, long maxBytesRead, long maxBytesWritten)Creates a Bandwidth instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BandwidthCheckergetReadBandwidthChecker()Read bandwidth getter.BandwidthCheckergetWriteBandwidthChecker()Write bandwidth getter.java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-