Class BatchingSettings.Builder (2.70.3) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 2.70.3keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   abstract   static   class  BatchingSettings . Builder  
  See the class documentation of BatchingSettings  for a description of the different
 values that can be set.
Constructors
   
  Builder() 
  
  Methods
   
  build() 
  
    
public   BatchingSettings   build ()  
  Build the BatchingSettings object.
setDelayThreshold(Duration delayThreshold) 
  
    
public   final   BatchingSettings . Builder   setDelayThreshold ( Duration   delayThreshold )  
  
Obsolete 
Use setDelayThresholdDuration(java.time.Duration) instead 
This feature is stable for usage in this major version, but may be deprecated in a future release.
 
This method is obsolete. Use #setDelayThresholdDuration(Duration)  instead
    
      
        Parameter  
      
        Name Description  
      
        delayThresholdorg.threeten.bp.Duration  
     
  
  
  setDelayThresholdDuration(Duration delayThreshold) 
  
    
public   abstract   BatchingSettings . Builder   setDelayThresholdDuration ( 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  
      
        Name Description  
      
        delayThresholdDuration  
     
  
  
  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  
      
        Name Description  
      
        elementCountThresholdLong  
     
  
  
  setFlowControlSettings(FlowControlSettings flowControlSettings) 
  
    
public   abstract   BatchingSettings . Builder   setFlowControlSettings ( FlowControlSettings   flowControlSettings )  
  Set the flow control settings to be used.
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  
      
        Name Description  
      
        enabledBoolean  
     
  
  
  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  
      
        Name Description  
      
        requestByteThresholdLong  
     
  
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  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-10-29 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]