Interface LimitedRateGroup

All Known Implementing Classes:
UtilitiesImpl.PluginLimitedRateGroup

public interface LimitedRateGroup
Allows for grouping of connections under a singular limit.
  • Method Details

    • getName

      String getName()
    • getRateLimitBytesPerSecond

      int getRateLimitBytesPerSecond()
      Get the current rate limit.
      Returns:
      rate in bytes per second, 0 for unlimited, -1 for disabled (BUT it is better to use isDisabled as some rate limiters implement logical disablement via other means (e.g. a download can implement it by disabling individual peers....)
    • updateBytesUsed

      void updateBytesUsed(int num)
    • isDisabled

      boolean isDisabled()
      Best way to check if rate limiter is effectively disabled
      Returns: