[go: up one dir, main page]

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

feat: Add Custom Part Metadata Decorator to ParallelCompositeUploadConfig #2434

Merged
merged 24 commits into from Mar 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
  • Loading branch information
sydney-munro and BenWhitehead committed Mar 15, 2024
commit 4f5144944c0b0320b34e2981cf70ee3d414ee2d0
Expand Up @@ -251,9 +251,7 @@ public ParallelCompositeUploadBlobWriteSessionConfig withPartCleanupStrategy(
*
* <p><i>Default: </i> {@link PartMetadataFieldDecorator#noOp()}
*
* @since 2.35.1 This new api is in preview and is subject to breaking changes.
* @param partMetadataFieldDecorator
* @return
* @since 2.36.0 This new api is in preview and is subject to breaking changes.
*/
@BetaApi
BenWhitehead marked this conversation as resolved.
Show resolved Hide resolved
public ParallelCompositeUploadBlobWriteSessionConfig withPartMetadataFieldDecorator(
Expand Down Expand Up @@ -674,11 +672,11 @@ protected String fmtFields(String randomKey, String ultimateObjectName, String p
}

/**
* A Decorator which is used to manipulate metadata fields, specifically on the part files used in
* A Decorator which is used to manipulate metadata fields, specifically on the part objects created in
* a Parallel Composite Upload
*
* @see #withPartMetadataFieldDecorator(PartMetadataFieldDecorator)
BenWhitehead marked this conversation as resolved.
Show resolved Hide resolved
* @since 2.35.1 This new api is in preview and is subject to breaking changes.
* @since 2.36.0 This new api is in preview and is subject to breaking changes.
*/
@BetaApi
@Immutable
Expand All @@ -688,16 +686,16 @@ public abstract static class PartMetadataFieldDecorator implements Serializable

/**
* A decorator that is used to manipulate the Custom Time Metadata field of part files. {@link
* com.google.storage.v2.Object#customTime_}
* BlobInfo#getCustomTimeOffsetDateTime()}
*
* <p>When provided with a duration, a time in the future will be calculated for each part file
* <p>When provided with a duration, a time in the future will be calculated for each part object
* upon upload, this new value can be used in OLM rules to cleanup abandoned part files.
*
* <p>See [CustomTime OLM
* documentation](https://cloud.google.com/storage/docs/lifecycle#dayssincecustomtime)
*
* @see #withPartMetadataFieldDecorator(PartMetadataFieldDecorator)
* @since 2.35.1 This new api is in preview and is subject to breaking changes.
* @since 2.36.0 This new api is in preview and is subject to breaking changes.
*/
@BetaApi
public static PartMetadataFieldDecorator setCustomTimeInFuture(Duration timeInFuture) {
Expand Down