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

Manage api constants immutable #408

Merged
merged 10 commits into from
Feb 12, 2021
Merged

Conversation

scottf
Copy link
Contributor

@scottf scottf commented Feb 11, 2021

  • management api read with examples
  • ApiConstants to share filed name constants and Json patterns
  • api objects made immutable
  • reusable JsonUtils methods to read fields to simplify construction and support immutability
  • ConsumerConfiguration maxWaiting not a field.
  • Verified default field values according to jetstream/api/v1 some -1 changes to 0, max_waiting removed, addresses TODOs

@scottf scottf marked this pull request as ready for review February 11, 2021 21:53
private final boolean success;
private final int purged;

public PurgeResponse(String json) {
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

return success;
}

public int getPurged() {
Copy link
Member

Choose a reason for hiding this comment

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

Needs comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,103 @@
package io.nats.client;
Copy link
Member

Choose a reason for hiding this comment

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

License/Copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

private final ZonedDateTime firstTime;
private final ZonedDateTime lastTime;

public StreamState(String json) {
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Member

@ColinSullivan1 ColinSullivan1 left a comment

Choose a reason for hiding this comment

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

...have a few questions - minor stuff - overall LGTM!

Having trouble keeping up with how fast you churn out these PRs... :)

Copy link
Member

@ColinSullivan1 ColinSullivan1 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@ColinSullivan1 ColinSullivan1 merged commit 826a66d into master Feb 12, 2021
@scottf scottf deleted the manage-api-constants-immutable branch February 12, 2021 17:06
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.

None yet

2 participants