-
public final class ThrottleManagerRate limiter that allows up to maxEventsPerHour events within a sliding 1-hour window. Thread-safe implementation suitable for concurrent access.
-
-
Constructor Summary
Constructors Constructor Description ThrottleManager(Integer maxEventsPerHour, Function0<Long> now)
-
Method Summary
Modifier and Type Method Description final BooleantryAcquire()Attempts to acquire a permit for sending an event. -
-
Method Detail
-
tryAcquire
final Boolean tryAcquire()
Attempts to acquire a permit for sending an event.
-
-
-
-