Class ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy (2.38.0)

public abstract static class ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy extends ParallelCompositeUploadBlobWriteSessionConfig.Factory<BufferHandlePool> 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. See Also: #withBufferAllocationStrategy(BufferAllocationStrategy)

Inheritance

java.lang.Object > com.google.cloud.storage.ParallelCompositeUploadBlobWriteSessionConfig.Factory > ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy

Implements

Serializable

Static Methods

fixedPool(int bufferCount, int bufferCapacity)

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. See Also: #withBufferAllocationStrategy(BufferAllocationStrategy)

Parameters
Name Description
bufferCount int

the number of buffers the pool will be

bufferCapacity int

the number of bytes each buffer should be

Returns
Type Description
ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy

simple(int capacity)

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. See Also: #withBufferAllocationStrategy(BufferAllocationStrategy)

Parameter
Name Description
capacity int

the number of bytes each buffer should be

Returns
Type Description
ParallelCompositeUploadBlobWriteSessionConfig.BufferAllocationStrategy