Class ActionRateLimiter
- java.lang.Object
-
- com.atlassian.confluence.impl.ratelimiter.ActionRateLimiter
-
public final class ActionRateLimiter extends Object
This class is for limiting the request and can be used in action classes.- Since:
- 8.7
-
-
Constructor Summary
Constructors Constructor Description ActionRateLimiter(@NonNull String permitsPerSecondKey, @org.checkerframework.checker.nullness.qual.NonNull double defaultPermitsPerSecond, @NonNull String permitsPerSecondGlobalKey, @org.checkerframework.checker.nullness.qual.NonNull double defaultPermitsPerSecondGlobal, @NonNull String cacheExpiryLimitKey, @org.checkerframework.checker.nullness.qual.NonNull long defaultCacheExpiryLimit)
This constructor is used to pass the system props and default value at the time of bean initialisation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
isRequestAllowed(String usernameOrEmail, String actionId)
Fetch the ratelimiter by userName or email for any actionId and returns the action result.
-
-
-
Constructor Detail
-
ActionRateLimiter
public ActionRateLimiter(@NonNull String permitsPerSecondKey, @org.checkerframework.checker.nullness.qual.NonNull double defaultPermitsPerSecond, @NonNull String permitsPerSecondGlobalKey, @org.checkerframework.checker.nullness.qual.NonNull double defaultPermitsPerSecondGlobal, @NonNull String cacheExpiryLimitKey, @org.checkerframework.checker.nullness.qual.NonNull long defaultCacheExpiryLimit)
This constructor is used to pass the system props and default value at the time of bean initialisation. Multiple instances can be created with multiple default values as per action/functionality requirement insettingsContext.xml
-
-