Class BatchingSettings.Builder (2.19.2)

public abstract static class 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()

public Builder()

Methods

build()

public BatchingSettings build()

Build the BatchingSettings object.

Returns
TypeDescription
BatchingSettings

setDelayThreshold(Duration delayThreshold)

public abstract BatchingSettings.Builder setDelayThreshold(Duration delayThreshold)

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
NameDescription
delayThresholdorg.threeten.bp.Duration
Returns
TypeDescription
BatchingSettings.Builder

setElementCountThreshold(Long elementCountThreshold)

public abstract BatchingSettings.Builder setElementCountThreshold(Long elementCountThreshold)

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
NameDescription
elementCountThresholdLong
Returns
TypeDescription
BatchingSettings.Builder

setFlowControlSettings(FlowControlSettings flowControlSettings)

public abstract BatchingSettings.Builder setFlowControlSettings(FlowControlSettings flowControlSettings)

Set the flow control settings to be used.

Parameter
NameDescription
flowControlSettingsFlowControlSettings
Returns
TypeDescription
BatchingSettings.Builder

setIsEnabled(Boolean enabled)

public abstract BatchingSettings.Builder setIsEnabled(Boolean enabled)

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
NameDescription
enabledBoolean
Returns
TypeDescription
BatchingSettings.Builder

setRequestByteThreshold(Long requestByteThreshold)

public abstract BatchingSettings.Builder setRequestByteThreshold(Long requestByteThreshold)

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
NameDescription
requestByteThresholdLong
Returns
TypeDescription
BatchingSettings.Builder