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

[Broker] Remove RateLimiter constructors and replace with builder usage #11599

Merged
merged 1 commit into from Aug 9, 2021

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Aug 9, 2021

Motivation

RateLimiter class has multiple constructors. A Lombok builder was added as part of PR #10384 since there was a need to have yet another constructor. Having a lot of different constructors on a class is prone to errors and makes the code hard to read.

Modifications

This PR removes all public constructors from RateLimiter class and replaces the usages of constructors with the usage of the builder in existing code.

@lhotari lhotari added area/broker type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use doc-not-needed Your PR changes do not impact docs labels Aug 9, 2021
@lhotari lhotari self-assigned this Aug 9, 2021
@lhotari lhotari added this to the 2.9.0 milestone Aug 9, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM

@merlimat merlimat merged commit fcd3336 into apache:master Aug 9, 2021
michaeljmarshall pushed a commit that referenced this pull request Dec 11, 2021
@michaeljmarshall
Copy link
Member

Cherry picked to branch-2.7 because one of the lines it removes is longer than 120 characters. Now branch-2.7 passes checkstyle.

bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.7 Archived: 2.7 is end of life doc-not-needed Your PR changes do not impact docs release/2.7.4 type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants