Package com.google.cloud.storage
Class DefaultBlobWriteSessionConfig
java.lang.Object
com.google.cloud.storage.BlobWriteSessionConfig
com.google.cloud.storage.DefaultBlobWriteSessionConfig
- All Implemented Interfaces:
Serializable
@Immutable
@BetaApi
@TransportCompatibility(GRPC)
public final class DefaultBlobWriteSessionConfig
extends BlobWriteSessionConfig
Default Configuration to represent uploading to Google Cloud Storage in a chunked manner.
Perform a resumable upload, uploading at most chunkSize bytes each PUT.
Configuration of chunk size can be performed via withChunkSize(int).
An instance of this class will provide a BlobWriteSession is logically equivalent to
the following:
Storage storage = ...;
WriteChannel writeChannel = storage.writer(BlobInfo, BlobWriteOption);
writeChannel.setChunkSize(chunkSize);
- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintThe number of bytes each chunk can be.withChunkSize(int chunkSize) Create a new instance with thechunkSizeset to the specified value.
-
Method Details
-
getChunkSize
public int getChunkSize()The number of bytes each chunk can be.Default:
16777216 (16 MiB)- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
withChunkSize
Create a new instance with thechunkSizeset to the specified value.Default:
16777216 (16 MiB)- Parameters:
chunkSize- The number of bytes each chunk should be. Must be >=262144 (256 KiB)- Returns:
- The new instance
- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-