All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[ 0.8.0 ] - 2024-08-05
- Changes from rate-limiter-web-core v0.8.0
.expression.Operator#IN
. Example use:@Rate(permits=0, when="web.request.remote.address in io.github.ratelimiter.Bots.getBotIps()")
.
- Expressions to require space around operators. For example:
use:
sys.time.elapsed > PT9S
not:sys.time.elapsed>PT9S
. - Expressions. Simply format
sys.property = {name = value}
tosys.propery[name] = value
. ResourcePath<String>
toResourcePath
. The generic type is always a string.
- Static factory methods from
.WebRateLimiterRegistrySpring
to.WebRateLimiterRegistries
.
[ 0.7.1 ] - 2024-01-26
- Improve performance, bump to v0.7.1
[ 0.7.0 ] - 2024-01-21
- Added RateLimiterFactory to replace ResourceLimiter
- Added method RateConfig.getParentOptional()
- Added more performance tests
- Revamp logic for matching rate conditions
- Renamed @Rate.name to @Rate.id
- Renamed @RateGroup.name to @RateGroup.id
- Renamed ElementId to RateId
- Renamed all ResourceLimiterXXX to RateLimiterXXX
- Renamed all ResourceLimitingXXX to RateLimitingXXX
- Renamed all ResourceLimiterConfigXXX to RateLimiterContextXXXX
- Removed ResourceLimiter and UsageListener
- Streamlined the methods in RateLimiterRegistry
- Moved RateLimiterProperties and RateLimiterRegistry to project rate-limiter-annotation
[ 0.6.0 ] - 2024-01-12
- Moved
Matcher
andExpressionMatcher
from project rate-limiter-annotation to project rate-limiter.
[ 0.5.1 ] - 2023-05-20
- Support composite condition expressions e.g of format
sys.time > X & sys.time < Y
- Support expression:
web.request.ip
. An aliasweb.request.remote.address
. - Added
@Rate#condition
. An alias for@Rate#when
. - Added more performance tests
- Renamed
Bandwidth#ALWAYS_AVAILABLE
toBandwidth#UNLIMITED
- Renamed
sys.memory.
tojvm.memory.
[ 0.5.0 ] - 2023-05-01
- Allow usage of 3rd party rate limiters
[ 0.4.2 ] - 2023-02-24
- Use system epoch millis as Ticker time
[ 0.4.1 ] - 2023-02-19
- Added expression handling for
sys.property
andsys.environment
- Added
UnmodifiableRegistries
- Added methods
ResourceLimiterRegistry#register
taking eitherClass
orMethod
argument. This enables the manual registration of resources for rate limting. - Added documentation for adapting to spring boot
- Modified
ResourceLimiterRegisry#getRateConfig
togetLimiterConfig
- Updated README. Note that resource packages/classes must be specified for automatic rate limiting to work.
- Removed dependency on
javax.cache.Cache
- Removed spring boot dependencies.
[ 0.4.0 ] - 2023-02-11
- Added
RateLimitProperties#getApplicationPath
to support application path.
- Fixed handling of multiple (non-composed) limits on a single node.
- Fixed handling of multiple methods with same path but different http method.
[ 0.3.4 ] - 2023-02-05
- Permit expressions (for rate conditions) having
null
right-hand side - Improved expression splitting
- Renamed
web.session.cookie
toweb.request.cookie
- Renamed
web.session.user.role
toweb.request.user.role
- Renamed
web.session.user.principal
toweb.request.user.principal
- Renamed
Element
toRateSource
and addPropertyRateSource
- Renamed
Matcher#matchOrNull
toMatcher#match
- Use String return type for
Matcher#match
[ 0.3.3 ] - 2023-02-04
- Added field
id
toBandwidths
- Added support for multiple (non-composed) bandwidths
- Renamed
Operator#DEFAULT
toOperator#NONE
[ 0.3.2 ] - 2023-01-29
- Added
when
field to@Rate
annotation. It is an alias for@RateCondition
- Removed
ResourceLimiters.of
. Rather use:ResourceLimiter.of
[ 0.3.1 ] - 2023-01-24
- Implement JVM thread rate condition expression, setup code coverage
[ 0.3.0 ] - 2023-01-22
- Implement
@RateCondition
using expressions - Add method
getResourceClasses
toRateLimitProperties
- Add a default operator i.e
Operator.DEFAULT
- Add more tests
- Improve performance
- Restrict
@RateGroup
annotation toElementType.ANNOTATION_TYPE
- Rename
MatchedResourceLimiter
toResourceLimiters
- Make
@RateGroup#name
or@RateGroup#value
mandatory. - Rename
Bandwidths.getMembers
toBandwidths.getBandwidths
- Remove annotation
@RateReqestIf
[ 0.2.0 ] - 2023-01-08
- Implement matching of requests via annotation
@RateRequestIf
- Implement and use
UnmodifiableRegistry
- Add alias
value
as alias forpermits
property in@Rate
- Rename package
com.looseboxes
toio.github.poshjosh
- Update README
- Move
@Rate
and@RateGroup
from packageratelimiter.annotations
toratelimiter.annotation
- Remove methods
RateCache.cache
andRateCache.listener
[ 0.1.0 ] - 2023-01-07
- Add
name
field to@RateLimit
annotation - Add builder like methods to
ResourceLimiter
for settingRateCache
andUsageListener
- Support single
Rate
per config in properties. Was previously a list ofRate
s
- Update README.md
- Rename all
of()
toofDefaults()
- Change
@RateLimit.limit
to@RateLimit.permits
- Change default
timeUnit
in@RateLimit
toTimeUnit.SECONDS
- Rename
WebResourceLimiterConfig
toResourceLimiterConfig
- Make
RateLimiterRegistry
implement Registries - Rename method
AnnotationProcessor.ofRates
toAnnotationProcessor.ofDefaults
- Rename
PatternMatchingResourceLimiter
toMatchedResourceLimiter
- Rename
RateLimit
annotation toRate
- Rename
RateLimitGroup
toRateGroup
- Change default
@Rate.duration
to 1
- Remove annotation
@Nullable
- Remove
Registries.factories()
- Remove the value-related generic from
RateCache
. The value now has a fixed type ofBandwidths
[ 0.0.9 ] - 2022-12-30
- Add more Bandwidth tests
[ 0.0.8 ] - 2022-12-29
- Separate repository for annotations: rate-limiter-annotation
- Change log