-
Notifications
You must be signed in to change notification settings - Fork 9
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
refactor: move global concurrent settings to a separate class #140
Conversation
WalkthroughThe changes involve a significant refactoring of the Changes
Assessment against linked issues
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporterConcurrentSettings.java (1)
99-103
: LGTM, but consider improving the documentation.The code changes are approved.
However, based on a learning from PR #125, it would be helpful to document that zero or negative costs in the
setConcurrentDownloadCost
method do not require any permits, allowing such downloads to bypass the semaphore mechanism. Consider adding this information to the class-level or method-level documentation.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporter.java (6 hunks)
- src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporterConcurrentSettings.java (1 hunks)
- src/test/java/com/flowingcode/vaadin/addons/gridexporter/VaadinServiceInitListenerImpl.java (1 hunks)
- src/test/java/com/flowingcode/vaadin/addons/gridexporter/test/ConcurrentExportTests.java (3 hunks)
Additional context used
Learnings (1)
src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporterConcurrentSettings.java (1)
Learnt from: javier-godoy PR: FlowingCode/GridExporterAddon#125 File: src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporter.java:338-402 Timestamp: 2024-06-09T06:20:09.702Z Learning: Zero or negative costs in the `setConcurrentDownloadCost` method do not require any permits, allowing such downloads to bypass the semaphore mechanism.
Additional comments not posted (13)
src/test/java/com/flowingcode/vaadin/addons/gridexporter/VaadinServiceInitListenerImpl.java (3)
13-13
: LGTM!The change is approved as it aligns with the PR objective of moving the global concurrent settings to the
GridExporterConcurrentSettings
class.
16-21
: LGTM!The changes are approved as they align with the PR objective of moving the global concurrent settings to the
GridExporterConcurrentSettings
class.
23-23
: LGTM!The change is approved as it aligns with the PR objective of moving the global concurrent settings to the
GridExporterConcurrentSettings
class.src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporterConcurrentSettings.java (5)
25-27
: LGTM!The code changes are approved.
40-42
: LGTM!The code changes are approved.
50-52
: LGTM!The code changes are approved.
61-63
: LGTM!The code changes are approved.
78-80
: LGTM!The code changes are approved.
src/test/java/com/flowingcode/vaadin/addons/gridexporter/test/ConcurrentExportTests.java (2)
12-12
: LGTM!The import statement for
GridExporterConcurrentSettings
class has been added correctly.
84-84
: LGTM! The changes align with the PR objective.The
GridExporter.setFailOnUiChange
calls have been consistently replaced withGridExporterConcurrentSettings.setFailOnUiChange
calls. This change aligns with the PR objective of moving the global concurrent settings to theGridExporterConcurrentSettings
class.Also applies to: 383-383
src/main/java/com/flowingcode/vaadin/addons/gridexporter/GridExporter.java (3)
368-368
: LGTM!The change is part of the refactoring to move global concurrent settings to a separate class. It improves encapsulation and reduces the reliance on static fields.
408-409
: LGTM!The change is part of the refactoring to move global concurrent settings to a separate class. It improves encapsulation and reduces the reliance on static fields.
454-454
: LGTM!The change is part of the refactoring to move global concurrent settings to a separate class. It improves encapsulation and reduces the reliance on static methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I moved the new API introduced in #125, #128 and #129 to a separate class, so that
GridExporter
does not gain so many methods. (The global settings, now inGridExporterConcurrentSettings
would likely be used only from vaadin service initializer.)Close #137
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
GridExporter
class to streamline download settings management.