-
Notifications
You must be signed in to change notification settings - Fork 859
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance Enhancement :Enable Passing of requestPath to CRT, Monito…
…r Progress Updates for putObject Operations
- Loading branch information
Showing
9 changed files
with
168 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "bugfix", | ||
"category": "S3 Transfer Manager", | ||
"contributor": "", | ||
"description": "Fix for [Issue#4168](https://github.com/aws/aws-sdk-java-v2/issues/4168) by enabling the direct passing of requestPath to the AWS Common Runtime (CRT). This ensures that Java SDK Transfer Manager no longer performs file I/O when using CRT, regardless." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
.../src/main/java/software/amazon/awssdk/services/s3/internal/crt/S3CrtProgressListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package software.amazon.awssdk.services.s3.internal.crt; | ||
|
||
import software.amazon.awssdk.annotations.SdkInternalApi; | ||
import software.amazon.awssdk.core.async.listener.PublisherListener; | ||
import software.amazon.awssdk.crt.s3.S3MetaRequestProgress; | ||
|
||
/** | ||
* S3CrtProgressListener delegates events to the underlying delegateListener if defined, avoiding null checks for API when using | ||
* S3MetaRequestProgress for GET calls. | ||
*/ | ||
@SdkInternalApi | ||
public final class S3CrtProgressListener implements PublisherListener<S3MetaRequestProgress> { | ||
|
||
PublisherListener<S3MetaRequestProgress> delegateListener; | ||
|
||
private S3CrtProgressListener(Builder builder) { | ||
this.delegateListener = builder.delegateListener; | ||
} | ||
|
||
static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
@Override | ||
public void subscriberOnNext(S3MetaRequestProgress s3MetaRequestProgress) { | ||
if (delegateListener != null) { | ||
delegateListener.subscriberOnNext(s3MetaRequestProgress); | ||
} | ||
} | ||
|
||
@Override | ||
public void subscriberOnComplete() { | ||
if (delegateListener != null) { | ||
delegateListener.subscriberOnComplete(); | ||
} | ||
} | ||
|
||
@Override | ||
public void subscriberOnError(Throwable t) { | ||
if (delegateListener != null) { | ||
delegateListener.subscriberOnError(t); | ||
} | ||
} | ||
|
||
@Override | ||
public void subscriptionCancel() { | ||
if (delegateListener != null) { | ||
delegateListener.subscriptionCancel(); | ||
} | ||
} | ||
|
||
static class Builder { | ||
|
||
PublisherListener<S3MetaRequestProgress> delegateListener; | ||
|
||
Builder delegateListener(PublisherListener<S3MetaRequestProgress> delegateListener) { | ||
this.delegateListener = delegateListener; | ||
return this; | ||
} | ||
|
||
public S3CrtProgressListener build() { | ||
return new S3CrtProgressListener(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters