mirror of https://github.com/apache/jclouds.git
JCLOUDS-805: Fix multiple invocations to MPU
Create new SequentialMultipartUploadStrategy for every invocation.
This commit is contained in:
parent
d0651951f8
commit
41a7a2d3d4
|
@ -83,7 +83,7 @@ public final class GoogleCloudStorageBlobStore extends BaseBlobStore {
|
||||||
private final Provider<FetchBlobMetadata> fetchBlobMetadataProvider;
|
private final Provider<FetchBlobMetadata> fetchBlobMetadataProvider;
|
||||||
private final BlobMetadataToObjectTemplate blobMetadataToObjectTemplate;
|
private final BlobMetadataToObjectTemplate blobMetadataToObjectTemplate;
|
||||||
private final BlobStoreListContainerOptionsToListObjectOptions listContainerOptionsToListObjectOptions;
|
private final BlobStoreListContainerOptionsToListObjectOptions listContainerOptionsToListObjectOptions;
|
||||||
private final MultipartUploadStrategy multipartUploadStrategy;
|
private final Provider<MultipartUploadStrategy> multipartUploadStrategy;
|
||||||
private final Supplier<String> projectId;
|
private final Supplier<String> projectId;
|
||||||
|
|
||||||
@Inject GoogleCloudStorageBlobStore(BlobStoreContext context, BlobUtils blobUtils, Supplier<Location> defaultLocation,
|
@Inject GoogleCloudStorageBlobStore(BlobStoreContext context, BlobUtils blobUtils, Supplier<Location> defaultLocation,
|
||||||
|
@ -93,7 +93,7 @@ public final class GoogleCloudStorageBlobStore extends BaseBlobStore {
|
||||||
Provider<FetchBlobMetadata> fetchBlobMetadataProvider,
|
Provider<FetchBlobMetadata> fetchBlobMetadataProvider,
|
||||||
BlobMetadataToObjectTemplate blobMetadataToObjectTemplate,
|
BlobMetadataToObjectTemplate blobMetadataToObjectTemplate,
|
||||||
BlobStoreListContainerOptionsToListObjectOptions listContainerOptionsToListObjectOptions,
|
BlobStoreListContainerOptionsToListObjectOptions listContainerOptionsToListObjectOptions,
|
||||||
MultipartUploadStrategy multipartUploadStrategy, @CurrentProject Supplier<String> projectId) {
|
Provider<MultipartUploadStrategy> multipartUploadStrategy, @CurrentProject Supplier<String> projectId) {
|
||||||
super(context, blobUtils, defaultLocation, locations);
|
super(context, blobUtils, defaultLocation, locations);
|
||||||
this.api = api;
|
this.api = api;
|
||||||
this.bucketToStorageMetadata = bucketToStorageMetadata;
|
this.bucketToStorageMetadata = bucketToStorageMetadata;
|
||||||
|
@ -227,7 +227,7 @@ public final class GoogleCloudStorageBlobStore extends BaseBlobStore {
|
||||||
@Override
|
@Override
|
||||||
public String putBlob(String container, Blob blob, PutOptions options) {
|
public String putBlob(String container, Blob blob, PutOptions options) {
|
||||||
if (options.multipart().isMultipart()) {
|
if (options.multipart().isMultipart()) {
|
||||||
return multipartUploadStrategy.execute(container, blob);
|
return multipartUploadStrategy.get().execute(container, blob);
|
||||||
} else {
|
} else {
|
||||||
return putBlob(container, blob);
|
return putBlob(container, blob);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue