Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bandwidth builder dsl #1

Merged
merged 3 commits into from
Mar 9, 2024

Conversation

pinut
Copy link
Contributor

@pinut pinut commented Mar 5, 2024

This PR updates Bucket4J to version 8.9.0 and adds support for the new Bandwidth builder API.

Code example:

// deprecated API
addLimit(Bandwidth.classic(5, Refill.intervally(1, 1.seconds.toJavaDuration())))

// new API
addLimit { capacity(5).refillIntervally(1, 1.seconds.toJavaDuration()).initialTokens(5) }

Base libraries and gradle build tooling receive updates with this pull request as well.

The recent refreshVersions plugin brings in support for gradle version catalogs.

I would be happy if you consider this pull request for merging.
Please don't hesitate to reach out in case you'd like to discuss any changes.

@pinut pinut requested a review from ksletmoe as a code owner March 5, 2024 15:35
Copy link
Owner

@ksletmoe ksletmoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks for the PR! I'll merge it, bump the version, and get a release build kicked off.

@ksletmoe ksletmoe merged commit 2569502 into ksletmoe:mainline Mar 9, 2024
2 checks passed
@ksletmoe
Copy link
Owner

ksletmoe commented Mar 9, 2024

Release is up on Sonatype. Thanks again for your contribution!

https://central.sonatype.com/artifact/com.sletmoe.bucket4k/bucket4k/1.1.0

@pinut pinut deleted the add-bandwidth-builder-dsl branch April 16, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants