Package com.google.cloud.storage
Class BlobWriteSessionConfigs
java.lang.Object
com.google.cloud.storage.BlobWriteSessionConfigs
Factory class to select and construct
BlobWriteSessionConfig
s.- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferToDiskThenUpload
bufferToDiskThenUpload
(Path path) Create a newBlobWriteSessionConfig
which will first buffer the content of the object to a temporary file under the specifiedpath
.static BufferToDiskThenUpload
bufferToDiskThenUpload
(Collection<Path> paths) Create a newBlobWriteSessionConfig
which will first buffer the content of the object to a temporary file under one of the specifiedpaths
.static BlobWriteSessionConfig
Create a newBlobWriteSessionConfig
which will first buffer the content of the object to a temporary file underjava.io.tmpdir
.Factory to produce the default configuration for uploading an object to Cloud Storage.
-
Method Details
-
getDefault
Factory to produce the default configuration for uploading an object to Cloud Storage.Configuration of the chunk size can be performed via
DefaultBlobWriteSessionConfig.withChunkSize(int)
.- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
bufferToTempDirThenUpload
Create a newBlobWriteSessionConfig
which will first buffer the content of the object to a temporary file underjava.io.tmpdir
.Once the file on disk is closed, the entire file will then be uploaded to Google Cloud Storage.
-
bufferToDiskThenUpload
Create a newBlobWriteSessionConfig
which will first buffer the content of the object to a temporary file under the specifiedpath
.Once the file on disk is closed, the entire file will then be uploaded to Google Cloud Storage.
-
bufferToDiskThenUpload
@BetaApi public static BufferToDiskThenUpload bufferToDiskThenUpload(Collection<Path> paths) throws IOException Create a newBlobWriteSessionConfig
which will first buffer the content of the object to a temporary file under one of the specifiedpaths
.Once the file on disk is closed, the entire file will then be uploaded to Google Cloud Storage.
The specifics of how the work is spread across multiple paths is undefined and subject to change.
-