Class TransferManagerConfig.Builder (2.29.0)

public static class TransferManagerConfig.Builder

Builds an instance of TransferManagerConfig See Also: TransferManagerConfig

Inheritance

java.lang.Object > TransferManagerConfig.Builder

Methods

build()

public TransferManagerConfig build()

Creates a TransferManagerConfig object.

Returns
TypeDescription
TransferManagerConfigTransferManagerConfig

setAllowDivideAndConquer(boolean allowDivideAndConquer)

public TransferManagerConfig.Builder setAllowDivideAndConquer(boolean allowDivideAndConquer)

Whether to allow Transfer Manager to perform chunked Uploads/Downloads if it determines chunking will be beneficial

Default Value: false See Also: TransferManagerConfig#isAllowDivideAndConquer()

Parameter
NameDescription
allowDivideAndConquerboolean
Returns
TypeDescription
TransferManagerConfig.Builder

the instance of Builder with the value for allowDivideAndConquer modified.

setMaxWorkers(int maxWorkers)

public TransferManagerConfig.Builder setMaxWorkers(int maxWorkers)

Maximum amount of workers to be allocated to perform work in Transfer Manager

Default Value: 2 * Runtime#getRuntime().availableProcessors() See Also: TransferManagerConfig#getMaxWorkers()

Parameter
NameDescription
maxWorkersint
Returns
TypeDescription
TransferManagerConfig.Builder

the instance of Builder with the value for maxWorkers modified.

setPerWorkerBufferSize(int perWorkerBufferSize)

public TransferManagerConfig.Builder setPerWorkerBufferSize(int perWorkerBufferSize)

Buffer size allowed to each worker

Default Value: 16MiB See Also: TransferManagerConfig#getPerWorkerBufferSize()

Parameter
NameDescription
perWorkerBufferSizeint
Returns
TypeDescription
TransferManagerConfig.Builder

the instance of Builder with the value for maxWorkers modified.

setStorageOptions(StorageOptions storageOptions)

public TransferManagerConfig.Builder setStorageOptions(StorageOptions storageOptions)

Storage options that Transfer Manager will use to interact with Google Cloud Storage

Default Value: StorageOptions#getDefaultInstance() See Also: TransferManagerConfig#getStorageOptions()

Parameter
NameDescription
storageOptionsStorageOptions
Returns
TypeDescription
TransferManagerConfig.Builder

the instance of Builder with the value for storageOptions modified.