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

Add base argument class for conditionally reading objects. #989

Conversation

balamurugana
Copy link
Member

GetObject, HeadObject and CopyObject S3 API support conditions
on reading objects. This patch introduces common base class
ObjectConditionalReadArgs for GetObjectArgs, StatObjectArgs,
CopySource and ComposeSource to avoid code duplication.

@balamurugana balamurugana force-pushed the Add-base-argument-class-for-conditionally-reading-objects branch 2 times, most recently from 5f4a9dd to 756da23 Compare June 24, 2020 06:35
public class StatObjectArgs extends ObjectConditionalReadArgs {
protected StatObjectArgs() {}

public StatObjectArgs(ObjectConditionalReadArgs args) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As the name suggest StatObjectArgs is an builder type then why is the constructor used. IMO it should be renamed to StatObject similar to ComposeObject.

sinhaashish
sinhaashish previously approved these changes Jun 25, 2020
Copy link
Contributor

@sinhaashish sinhaashish left a comment

Choose a reason for hiding this comment

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

LGTM

`GetObject`, `HeadObject` and `CopyObject` S3 API support conditions
on reading objects. This patch introduces common base class
`ObjectConditionalReadArgs` for `GetObjectArgs`, `StatObjectArgs`,
`CopySource` and `ComposeSource` to avoid code duplication.
@balamurugana balamurugana force-pushed the Add-base-argument-class-for-conditionally-reading-objects branch from 756da23 to 6f7c7e6 Compare June 25, 2020 14:42
Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sinhaashish sinhaashish left a comment

Choose a reason for hiding this comment

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

LGTM

@balamurugana balamurugana merged commit 7700134 into minio:master Jun 26, 2020
@balamurugana balamurugana deleted the Add-base-argument-class-for-conditionally-reading-objects branch June 26, 2020 04:47
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.

3 participants