Interface BandwidthThrottler

  • All Known Implementing Classes:
    BandwidthThrottlerImpl

    public interface BandwidthThrottler
    Interface for throttler based on bandwidth.
    • Method Detail

      • setUpstreamKbps

        void setUpstreamKbps​(long kbps)
        Set upload max bandwidth in kilobits per seconds.
        Parameters:
        kbps - max bandwidth in kbps
      • getAllowedBytes

        int getAllowedBytes​(int len)
        Get the allowed number of bytes to read from or write to socket.
        Parameters:
        len - maximum number of bytes.
        Returns:
        allowed bytes