Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Document default values for BatchingSettings #639

Merged
merged 2 commits into from
Jan 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
/**
* Represents the batching settings to use for an API method that is capable of batching.
*
* <p>By default the settings are configured to <b>not</b> use batching (i.e. the batch size
* threshold is 1). This is the safest default behavior, which has meaning in all possible
* scenarios. Users are expected to configure actual batching thresholds explicitly: the element
* count, the request bytes count and the delay.
*
* <p>Warning: With the wrong settings, it is possible to cause long periods of dead waiting time.
*
* <p>When batching is turned on for an API method, a call to that method will result in the request
Expand All @@ -50,12 +55,13 @@
*
* <ul>
* <li><b>Delay Threshold</b>: Counting from the time that the first message is queued, once this
* delay has passed, then send the batch.
* delay has passed, then send the batch. The default value is 1 millisecond.
* <li><b>Message Count Threshold</b>: Once this many messages are queued, send all of the
* messages in a single call, even if the delay threshold hasn't elapsed yet.
* messages in a single call, even if the delay threshold hasn't elapsed yet. The default
* value is 1 message.
* <li><b>Request Byte Threshold</b>: Once the number of bytes in the batched request reaches this
* threshold, send all of the messages in a single call, even if neither the delay or message
* count thresholds have been exceeded yet.
* count thresholds have been exceeded yet. The default value is 1 byte.
* </ul>
*
* <p>These thresholds are treated as triggers, not as limits. Thus, if a request is made with 2x
Expand Down