Skip to content

Adding SqsBatchManager interfaces and Refactoring core BatchManager with interfaces #2645

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

Conversation

16lim21
Copy link
Contributor

@16lim21 16lim21 commented Aug 5, 2021

Motivation and Context

I added interfaces for the core BatchManager to abstract away the private methods in the implementation. I also created the interfaces and class files for the SqsBatchManager to prepare for implementation.

Description

I added some interfaces in a new batchmanager package that is not internal and abstracts away the implementation details for the underlying DefaultBatchManager. Customers will therefore interact with the interfaces and classes in the public batchmanager package as opposed to the internal one.

Meanwhile, I modified the BatchOverrideConfiguration class to accept optional values, which would be filled in with default values by a core BatchConfiguration class. Services that implement a BatchManager will not need to rely on this BatchConfiguration class, it is just there to ensure default values are provided in case customers implement their own service-specific batch manager.

Finally, I added some classes and interfaces for the SqsBatchManager. The actual implementation has not been finished yet, nor has tests been written. Some code in the DefaultSqsBatchManager are just the functions copied over from the Sqs batch manager integration test.

Testing

Modifications to the core BatchManager are covered by tests in the last PR. No tests have been written yet for the SqsBatchManager but will be done in a separate PR covering implementation details.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Build failed because of a checkstyle error in sqs, otherwise lgtm

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 6, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 25 Code Smells

80.9% 80.9% Coverage
0.0% 0.0% Duplication

@zoewangg zoewangg merged commit 2dc2d4c into aws:feature/master/automatic-request-batching Aug 9, 2021
aws-sdk-java-automation added a commit that referenced this pull request Aug 7, 2023
…a1d26b9d5

Pull request: release <- staging/2bddec1a-c0a4-4e5a-9f56-5aea1d26b9d5
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