Class PingSpaceMonitor

java.lang.Object
com.biglybt.core.speedmanager.impl.v2.PingSpaceMonitor

public class PingSpaceMonitor extends Object
  • Field Details

    • pingMap

    • startTime

      long startTime
    • INTERVAL

      private static final long INTERVAL
      See Also:
    • maxGoodPing

      final int maxGoodPing
    • minBadPing

      final int minBadPing
    • nBadPings

      int nBadPings
    • nGoodPings

      int nGoodPings
    • nNeutralPings

      int nNeutralPings
    • upNone

      int upNone
    • upLow

      int upLow
    • upMed

      int upMed
    • upHigh

      int upHigh
    • upAtLimit

      int upAtLimit
    • downNone

      int downNone
    • downLow

      int downLow
    • downMed

      int downMed
    • downHigh

      int downHigh
    • downAtLimit

      int downAtLimit
    • transferMode

      TransferMode transferMode
    • UPLOAD

      public static final int UPLOAD
      See Also:
    • DOWNLOAD

      public static final int DOWNLOAD
      See Also:
    • NONE

      public static final int NONE
      See Also:
    • hasNewLimit

      boolean hasNewLimit
    • newLimit

      int newLimit
    • limitType

      int limitType
  • Constructor Details

    • PingSpaceMonitor

      public PingSpaceMonitor(int _maxGoodPing, int _minBadPing, TransferMode mode)
  • Method Details

    • setCurrentTransferRates

      public void setCurrentTransferRates(int downRate, int upRate)
      Parameters:
      downRate - -
      upRate - -
    • addToPingMapData

      public boolean addToPingMapData(int lastMetricValue, TransferMode mode)
      Do a check and decide if the limits should be dropped.
      Parameters:
      lastMetricValue - -
      mode - - the TransferMode
      Returns:
      - true if the limits should be dropped.
    • checkForLowerLimits

      private boolean checkForLowerLimits()
    • reset

      public void reset(TransferMode mode)
    • hasNewLimit

      boolean hasNewLimit()
      True if we have a new limit.
      Returns:
      - true if there is a new limit.
    • getNewLimit

      public int getNewLimit()
    • limitType

      public int limitType()
    • resetNewLimit

      public void resetNewLimit()
      Call after getting new limits.