Class ThrottlingState

java.lang.Object
com.adobe.acs.commons.throttling.ThrottlingState

public class ThrottlingState extends Object
  • Field Details

    • timestamps

      protected Instant[] timestamps
      This array holds the timestamps when requests have reached the system; in case the timestamp has already expired, Instant.EPOCH is stored. Access to this array should be guarded by the lock.
    • loadEstimator

      protected LoadEstimator loadEstimator
    • currentIndex

      protected AtomicInteger currentIndex
  • Constructor Details

  • Method Details

    • evaluateThrottling

      protected ThrottlingDecision evaluateThrottling()
      Returns:
    • resize

      protected int resize(int newSize)
      resize the queue
      Parameters:
      newSize - new size of queue
      Returns:
      the number of free entries in the array