Package com.attivio.connector
Class ConcurrentThrottler
- java.lang.Object
-
- com.attivio.connector.ConcurrentThrottler
-
public class ConcurrentThrottler extends java.lang.Object
The implementation enforces a quota of request executions per time unit. It is used by the concurrent scanner to impose cloud servers access quota. Failure to impose quota can cause service denials. If the scanner is stopped, the throttler is closed and all the requesters get permits. But since we closed all the requests are canceled so the requesters will not try to access the server.
-
-
Constructor Summary
Constructors Constructor Description ConcurrentThrottler(long timeUnitMillis, long quota)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
backOff(long millisBackOffPeriod)
void
close()
Let all the requester pass and cancel the time window timervoid
getPermit()
Blocked until a permit is granted.
-