Class BatchingSettings.Builder (2.16.0)

publicabstractstaticclass BatchingSettings.Builder

See the class documentation of BatchingSettings for a description of the different values that can be set.

Inheritance

java.lang.Object > BatchingSettings.Builder

Constructors

Builder()

publicBuilder()

Methods

build()

publicBatchingSettingsbuild()

Build the BatchingSettings object.

Returns
Type Description

setDelayThreshold(Duration delayThreshold)

publicabstractBatchingSettings.BuildersetDelayThreshold(DurationdelayThreshold)

Set the delay threshold to use for batching. After this amount of time has elapsed (counting from the first element added), the elements will be wrapped up in a batch and sent. This value should not be set too high, usually on the order of milliseconds. Otherwise, calls might appear to never complete.

Parameter
Name Description
delayThreshold org.threeten.bp.Duration
Returns
Type Description

setElementCountThreshold(Long elementCountThreshold)

publicabstractBatchingSettings.BuildersetElementCountThreshold(LongelementCountThreshold)

Set the element count threshold to use for batching. After this many elements are accumulated, they will be wrapped up in a batch and sent.

Parameter
Name Description
elementCountThreshold Long
Returns
Type Description

setFlowControlSettings(FlowControlSettings flowControlSettings)

publicabstractBatchingSettings.BuildersetFlowControlSettings(FlowControlSettingsflowControlSettings)

Set the flow control settings to be used.

Parameter
Name Description
flowControlSettings FlowControlSettings
Returns
Type Description

setIsEnabled(Boolean enabled)

publicabstractBatchingSettings.BuildersetIsEnabled(Booleanenabled)

Set if the batch should be enabled. If set to false, the batch logic will be disabled and the simple API call will be used. Default to true.

Parameter
Name Description
enabled Boolean
Returns
Type Description

setRequestByteThreshold(Long requestByteThreshold)

publicabstractBatchingSettings.BuildersetRequestByteThreshold(LongrequestByteThreshold)

Set the request byte threshold to use for batching. After this many bytes are accumulated, the elements will be wrapped up in a batch and sent.

Parameter
Name Description
requestByteThreshold Long
Returns
Type Description

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.