Package com.adobe.acs.commons.throttling
Class ThrottlingState
java.lang.Object
com.adobe.acs.commons.throttling.ThrottlingState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicIntegerprotected LoadEstimatorprotected Instant[]This array holds the timestamps when requests have reached the system; in case the timestamp has already expired, Instant.EPOCH is stored. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ThrottlingDecisionprotected intresize(int newSize) resize the queue
-
Field Details
-
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
-
currentIndex
-
-
Constructor Details
-
ThrottlingState
-
-
Method Details
-
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
-