Skip to content

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

Merged
merlimat merged 1 commit into
apache:masterfrom
lhotari:lh-remove-ratelimiter-constructors
Aug 9, 2021
Merged

[Broker] Remove RateLimiter constructors and replace with builder usage#11599
merlimat merged 1 commit into
apache:masterfrom
lhotari:lh-remove-ratelimiter-constructors

Conversation

@lhotari

@lhotari lhotari commented Aug 9, 2021

Copy link
Copy Markdown
Member

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

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lgtm

@michaeljmarshall michaeljmarshall left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

4 participants