Package com.attivio.connector
Class ConcurrentThrottler
- java.lang.Object
-
- com.attivio.connector.ConcurrentThrottler
-
public class ConcurrentThrottler extends java.lang.ObjectThe 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 voidbackOff(long millisBackOffPeriod)voidclose()Let all the requester pass and cancel the time window timervoidgetPermit()Blocked until a permit is granted.
-