Package com.google.cloud.storage
Class ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy
java.lang.Object
com.google.cloud.storage.ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ParallelCompositeUploadBlobWriteSessionConfig
@BetaApi
@Immutable
public abstract static class ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy
extends Object
implements Serializable
A strategy which dictates how buffers are to be used for individual parts. The chosen strategy
will apply to all instances of
BlobWriteSession
created from a single instance of
Storage
.- Since:
- 2.28.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
Method Details
-
simple
@BetaApi public static ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy simple(int capacity) Create a buffer strategy which will rely upon standard garbage collection. Each buffer will be used once and then garbage collected.- Parameters:
capacity
- the number of bytes each buffer should be- Since:
- 2.28.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
fixedPool
@BetaApi public static ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy fixedPool(int bufferCount, int bufferCapacity) Create a buffer strategy which will have a fixed size pool of buffers. Each buffer will be lazily allocated.- Parameters:
bufferCount
- the number of buffers the pool will bebufferCapacity
- the number of bytes each buffer should be- Since:
- 2.28.0 This new api is in preview and is subject to breaking changes.
- See Also:
-