Class: Google::Gax::BundleOptions
- Inherits:
-
Struct
- Object
- Struct
- Google::Gax::BundleOptions
- Defined in:
- lib/google/gax/settings.rb
Overview
Holds values used to configure bundling.
The xxx_threshold attributes are used to configure when the bundled request should be made.
Instance Attribute Summary collapse
-
#delay_threshold_millis ⇒ Numeric
The bundled request will be sent this amount of time after the first element in the bundle was added to it.
-
#element_count_limit ⇒ Numeric
Represents a hard limit on the number of elements in the repeated field of the bundle; if adding a request to a bundle would exceed this value, the bundle is sent and the new request is added to a fresh bundle.
-
#element_count_threshold ⇒ Numeric
The bundled request will be sent once the count of outstanding elements in the repeated field reaches this value.
-
#request_byte_limit ⇒ Numeric
Represents a hard limit on the size of the bundled request; if adding a request to a bundle would exceed this value, the bundle is sent and the new request is added to a fresh bundle.
-
#request_byte_threshold ⇒ Numeric
The bundled request will be sent once the count of bytes in the request reaches this value.
Instance Method Summary collapse
-
#initialize(element_count_threshold: 0, element_count_limit: 0, request_byte_threshold: 0, request_byte_limit: 0, delay_threshold_millis: 0) ⇒ BundleOptions
constructor
A new instance of BundleOptions.
Constructor Details
#initialize(element_count_threshold: 0, element_count_limit: 0, request_byte_threshold: 0, request_byte_limit: 0, delay_threshold_millis: 0) ⇒ BundleOptions
Returns a new instance of BundleOptions.
304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/google/gax/settings.rb', line 304 def initialize(element_count_threshold: 0, element_count_limit: 0, request_byte_threshold: 0, request_byte_limit: 0, delay_threshold_millis: 0) super( element_count_threshold, element_count_limit, request_byte_threshold, request_byte_limit, delay_threshold_millis) end |
Instance Attribute Details
#delay_threshold_millis ⇒ Numeric
Returns the bundled request will be sent this amount of time after the first element in the bundle was added to it.
270 271 272 |
# File 'lib/google/gax/settings.rb', line 270 def delay_threshold_millis @delay_threshold_millis end |
#element_count_limit ⇒ Numeric
Returns represents a hard limit on the number of elements in the repeated field of the bundle; if adding a request to a bundle would exceed this value, the bundle is sent and the new request is added to a fresh bundle. It is invalid for a single request to exceed this limit.
270 271 272 |
# File 'lib/google/gax/settings.rb', line 270 def element_count_limit @element_count_limit end |
#element_count_threshold ⇒ Numeric
Returns the bundled request will be sent once the count of outstanding elements in the repeated field reaches this value.
270 271 272 |
# File 'lib/google/gax/settings.rb', line 270 def element_count_threshold @element_count_threshold end |
#request_byte_limit ⇒ Numeric
Returns represents a hard limit on the size of the bundled request; if adding a request to a bundle would exceed this value, the bundle is sent and the new request is added to a fresh bundle. It is invalid for a single request to exceed this limit. Note that this value is pessimistically approximated by summing the bytesizes of the elements in the repeated field, with a buffer applied to correspond to the resulting under-approximation.
270 271 272 |
# File 'lib/google/gax/settings.rb', line 270 def request_byte_limit @request_byte_limit end |
#request_byte_threshold ⇒ Numeric
Returns the bundled request will be sent once the count of bytes in the request reaches this value. Note that this value is pessimistically approximated by summing the bytesizes of the elements in the repeated field, and therefore may be an under-approximation.
270 271 272 |
# File 'lib/google/gax/settings.rb', line 270 def request_byte_threshold @request_byte_threshold end |