Serialized Form
-
Package com.giffing.bucket4j.spring.boot.starter.context
-
Class com.giffing.bucket4j.spring.boot.starter.context.ExecutePredicateDefinition
class ExecutePredicateDefinition extends Object implements Serializable -
Exception com.giffing.bucket4j.spring.boot.starter.context.RateLimitException
class RateLimitException extends RuntimeException implements Serializable
-
-
Package com.giffing.bucket4j.spring.boot.starter.context.properties
-
Class com.giffing.bucket4j.spring.boot.starter.context.properties.BandWidth
class BandWidth extends Object implements Serializable-
Serialized Fields
-
capacity
@jakarta.validation.constraints.Positive long capacity
-
id
String id
-
initialCapacity
@PositiveOrZero Long initialCapacity
-
refillCapacity
@Min(1L) Long refillCapacity
-
refillSpeed
@NotNull RefillSpeed refillSpeed
-
time
@jakarta.validation.constraints.Positive long time
-
unit
@NotNull ChronoUnit unit
-
-
-
Class com.giffing.bucket4j.spring.boot.starter.context.properties.Bucket4JConfiguration
class Bucket4JConfiguration extends Object implements Serializable-
Serialized Fields
-
cacheName
@NotBlank String cacheName
The cache name. Should be provided or an exception is thrown -
filterMethod
@NotNull FilterMethod filterMethod
The defaultFilterMethodisFilterMethod.SERVLET -
filterOrder
@NotNull Integer filterOrder
The filter order has a default of the highest precedence reduced by 10 -
hideHttpResponseHeaders
@NotNull Boolean hideHttpResponseHeaders
Hides the HTTP response headers x-rate-limit-remaining x-rate-limit-retry-after-secondsIt does not effect custom defined httpResponseHeaders.
-
httpContentType
String httpContentType
The HTTP Content-Type which should be returned -
httpResponseBody
String httpResponseBody
The HTTP content which should be used in case of rate limiting -
httpResponseHeaders
Map<String,
String> httpResponseHeaders -
httpStatusCode
org.springframework.http.HttpStatus httpStatusCode
The HTTP status code which should be returned when limiting the rate. -
id
String id
This identifier is used for saving and retrieving configurations in the cache. Setting the id is mandatory when configuration caching is enabled. -
majorVersion
@jakarta.validation.constraints.Min(1L),@jakarta.validation.constraints.Max(92000000L) long majorVersion
This version number is intended to be managed by the application.properties and for configuration changes by external systems during runtime. The version is only relevant for filters that hava their identifier set, and defaults to 1 if not configured.The value is maxed at 92 million, since it is combined with the minor version into a single Long and cannot exceed the Long max value.
-
metrics
@Valid Metrics metrics
-
minorVersion
@jakarta.validation.constraints.Min(1L),@jakarta.validation.constraints.Max(99999999999L) long minorVersion
This version number is intended for internal configuration updates during runtime, for example based on CPU-usage of the system, and usually does not need to be configured in the application.properties. The version is only relevant for filters that hava their identifier set, and defaults to 1 if not configured.The value is maxed at 99 billion, since it is combined with the major version into a single Long version and cannot exceed the Long max value.
-
rateLimits
@NotEmpty @Valid List<RateLimit> rateLimits
-
strategy
@NotNull RateLimitConditionMatchingStrategy strategy
The default strategy isRateLimitConditionMatchingStrategy.FIRST. -
url
@NotBlank String url
The URL to which the filter should be registered
-
-
-
Class com.giffing.bucket4j.spring.boot.starter.context.properties.Metrics
class Metrics extends Object implements Serializable-
Serialized Fields
-
enabled
boolean enabled
-
tags
List<MetricTag> tags
-
types
List<MetricType> types
-
-
-
Class com.giffing.bucket4j.spring.boot.starter.context.properties.MetricTag
class MetricTag extends Object implements Serializable-
Serialized Fields
-
expression
@NotBlank String expression
-
key
String key
-
types
List<MetricType> types
-
-
-
Class com.giffing.bucket4j.spring.boot.starter.context.properties.RateLimit
class RateLimit extends Object implements Serializable-
Serialized Fields
-
bandwidths
@NotEmpty @Valid List<BandWidth> bandwidths
-
cacheKey
@NotBlank String cacheKey
SPEL expression to dynamic evaluate filter key -
executeCondition
String executeCondition
SpEl condition to check if the rate limit should be executed. If null there is no check. -
executePredicates
@Valid List<ExecutePredicateDefinition> executePredicates
-
numTokens
@NotNull @Min(1L) Integer numTokens
The number of tokens that should be consumed -
postExecuteCondition
String postExecuteCondition
If you provide a post execution condition. The incoming check only estimates the token consumption. It will not consume a token. This check is based on the response to decide if the token should be consumed or not. -
skipCondition
String skipCondition
SpEl condition to check if the rate-limit should apply. If null there is no check. -
skipPredicates
@Valid List<ExecutePredicateDefinition> skipPredicates
-
tokensInheritanceStrategy
@NotNull io.github.bucket4j.TokensInheritanceStrategy tokensInheritanceStrategy
The token inheritance strategy to use when replacing the configuration of a bucket
-
-
-