Class TransferManagerConfig.Builder (2.24.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
Type Description
TransferManagerConfig TransferManagerConfig

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
Name Description
allowDivideAndConquer boolean
Returns
Type Description
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
Name Description
maxWorkers int
Returns
Type Description
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
Name Description
perWorkerBufferSize int
Returns
Type Description
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
Name Description
storageOptions StorageOptions
Returns
Type Description
TransferManagerConfig.Builder

the instance of Builder with the value for storageOptions modified.