Class RealmTokenBucketRateLimiter
java.lang.Object
org.apache.polaris.service.ratelimiter.RealmTokenBucketRateLimiter
- All Implemented Interfaces:
RateLimiter
@Identifier("default")
@RequestScoped
public class RealmTokenBucketRateLimiter
extends Object
implements RateLimiter
Rate limiter that maps the request's realm identifier to its own TokenBucket, with its own
capacity.
-
Constructor Summary
ConstructorsConstructorDescriptionRealmTokenBucketRateLimiter(TokenBucketFactory tokenBucketFactory, org.apache.polaris.core.context.RealmContext realmContext) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis signifies that a request is being made.
-
Constructor Details
-
RealmTokenBucketRateLimiter
@Inject public RealmTokenBucketRateLimiter(TokenBucketFactory tokenBucketFactory, org.apache.polaris.core.context.RealmContext realmContext)
-
-
Method Details
-
canProceed
public boolean canProceed()This signifies that a request is being made. That is, the rate limiter should count the request at this point.- Specified by:
canProceedin interfaceRateLimiter- Returns:
- Whether the request is allowed to proceed by the rate limiter
-