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

Introducing callback for DynamoDB lease table #413

Merged
merged 8 commits into from
Sep 25, 2018

Conversation

sahilpalvia
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:

  • Introducing TableCreatorCallback for DynamoDB lease management
  • Introducing DoesNothingTableCreatorCallback
  • Intoducing TableCreatorCallback config in LeaseManagementConfig, with DoesNothingTableCreatorCallback as the default

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sahil Palvia added 2 commits September 20, 2018 15:01
* Introducing TableCreatorCallback for DynamoDB lease management
* Introducing DoesNothingTableCreatorCallback
* Intoducing TableCreatorCallback config in LeaseManagementConfig, with DoesNothingTableCreatorCallback as the default
@sahilpalvia sahilpalvia added the v2.x Issues related to the 2.x version label Sep 21, 2018
Sahil Palvia added 2 commits September 21, 2018 15:38
* Renaming DoesNothingTableCreatorCallback to NoOpTableCreatorCallback
* Making performPostTableCreation method package private
* Removing newly added method to LeaseRefresher interface
Copy link
Contributor

@pfifer pfifer left a comment

Choose a reason for hiding this comment

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

Looks good, some minor comments.

/**
* Callback interface for interacting with the DynamoDB lease table post creation.
*/
public interface TableCreatorCallback {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would annotate this with @FunctionalInterface if you intend it to be used with a lambda.

/**
* This implementation of the TableCreatorCallback does nothing.
*/
public class NoOpTableCreatorCallback implements TableCreatorCallback {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would probably make this a singleton on the TableCreatorCallback interface instead of its own class.

@sahilpalvia sahilpalvia added this to the v2.0.3 milestone Sep 25, 2018
@sahilpalvia sahilpalvia merged commit a88d4ba into awslabs:master Sep 25, 2018
@sahilpalvia sahilpalvia deleted the dynamo-callback branch September 25, 2018 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.x Issues related to the 2.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants