Method | Description | |
---|---|---|
RollingWindowThrottler ( int occurrences, System.TimeSpan timeUnit ) : System |
Constructs an instance of the throttler.
|
|
ShouldThrottle ( int tokens, long &waitTimeMillis ) : bool |
Tries to reserve tokens in the configured time unit.
|
|
ShouldThrottle ( long &waitTimeMillis ) : bool |
Tries to reserve one token in the configured time unit.
|
Method | Description | |
---|---|---|
CheckExitTimeQueue ( ) : void |
public RollingWindowThrottler ( int occurrences, System.TimeSpan timeUnit ) : System | ||
occurrences | int | Maximum number of occurences per time unit allowed. |
timeUnit | System.TimeSpan | The time unit in which the occurences are constrained. |
return | System |
public ShouldThrottle ( int tokens, long &waitTimeMillis ) : bool | ||
tokens | int | total number of reservations |
waitTimeMillis | long | total suggested wait time in milliseconds till tokens will become available for reservation |
return | bool |
public ShouldThrottle ( long &waitTimeMillis ) : bool | ||
waitTimeMillis | long | total suggested wait time in milliseconds till tokens will become available for reservation |
return | bool |