Interface ParallelUploadConfig.UploadBlobInfoFactory
- Enclosing class:
- ParallelUploadConfig
public static interface ParallelUploadConfig.UploadBlobInfoFactory
-
Method Summary
Modifier and TypeMethodDescriptionMethod to produce aBlobInfoto be used for the upload to Cloud Storage.The default instance which applies not modification to the providedfileNameprefixObjectNames(String prefix) Adapter factory to provide the same semantics as if usingParallelUploadConfig.Builder.setPrefix(String)transformFileName(Function<String, String> fileNameTransformer) Convenience method to "lift" aFunctionthat transforms the file name to anParallelUploadConfig.UploadBlobInfoFactory
-
Method Details
-
apply
Method to produce aBlobInfoto be used for the upload to Cloud Storage.The bucket name in the returned BlobInfo MUST be equal to the value provided to the
ParallelUploadConfig.Builder.setBucketName(String), if not that upload will fail with aTransferStatus.FAILED_TO_STARTand aBucketNameMismatchException.- Parameters:
bucketName- The name of the bucket to be uploaded to. The value provided here will be the value fromParallelUploadConfig.getBucketName().fileName- The String representation of the absolute path of the file to be uploaded- Returns:
- The instance of
BlobInfothat should be used to upload the file to Cloud Storage.
-
prefixObjectNames
Adapter factory to provide the same semantics as if usingParallelUploadConfig.Builder.setPrefix(String) -
defaultInstance
The default instance which applies not modification to the providedfileName -
transformFileName
static ParallelUploadConfig.UploadBlobInfoFactory transformFileName(Function<String, String> fileNameTransformer) Convenience method to "lift" aFunctionthat transforms the file name to anParallelUploadConfig.UploadBlobInfoFactory
-