TsgcWSRateLimiterMethods › ResetAll

ResetAll Method

Clears every internal counter and resets the Stats object.

Syntax

procedure ResetAll;

Remarks

Empties the Token Bucket table, Sliding Window table, Fixed Window table, quota counters, burst tracker and connection counter for every tracked key, and calls Stats.Reset so TotalRequests / TotalThrottled / TotalQuotaExceeded / ActiveKeys return to zero and Uptime restarts. Use at administrative reset points (after deploying a new configuration, on a nightly cron or after ingesting a persisted state from LoadStateFromFile that you want to discard).

Example

// Clear everything after a config change
sgcWSRateLimiter1.ResetAll;

Back to Methods