Package com.google.api.gax.batching (2.46.1)

Repository

Settings Classes

Settings classes can be used to configure credentials, endpoints, and retry settings for a Client.

SettingsDescription
com.google.api.gax.batching.BatchingCallSettingsThis is an extension of UnaryCallSettings class to configure a UnaryCallable for calls to an API method that supports batching. The batching settings are provided using the instance of BatchingSettings.
com.google.api.gax.batching.BatchingSettingsRepresents the batching settings to use for an API method that is capable of batching.

By default the settings are configured to not use batching (i.e. the batch size threshold is 1). This is the safest default behavior, which has meaning in all possible

com.google.api.gax.batching.DynamicFlowControlSettingsSettings for dynamic flow control
com.google.api.gax.batching.FlowControlSettingsSettings for FlowController.

Classes

ClassDescription
com.google.api.gax.batching.AccumulatingBatchReceiverA simple ThresholdBatchReceiver that just accumulates batches.
com.google.api.gax.batching.BatchEntryThis class contains the element and its corresponding unresolved future, which would be resolved when batch is successful or failed.
com.google.api.gax.batching.BatcherImplQueues up the elements until #flush() is called; once batching is over, returned future resolves.

This class is not thread-safe, and expects to be used from a single thread.

com.google.api.gax.batching.BatchingCallSettings.BuilderA base builder class for BatchingCallSettings. See the class documentation of BatchingCallSettings for a description of the different values that can be set.
com.google.api.gax.batching.BatchingFlowControllerWraps a FlowController for use by batching.
com.google.api.gax.batching.BatchingSettings.BuilderSee the class documentation of BatchingSettings for a description of the different values that can be set.
com.google.api.gax.batching.BatchingThresholdsFactory methods for general-purpose batching thresholds.
com.google.api.gax.batching.DynamicFlowControlSettings.Builder
com.google.api.gax.batching.FlowControlEventStatsRecord the statistics of flow control events.

This class is populated by FlowController, which will record throttling events. Currently it only keeps the last flow control event, but it could be expanded to record more information in

com.google.api.gax.batching.FlowControlEventStats.FlowControlEventA flow control event. Record throttled time if LimitExceededBehavior is LimitExceededBehavior#Block, or the exception if the behavior is LimitExceededBehavior#ThrowException.
com.google.api.gax.batching.FlowControlSettings.Builder
com.google.api.gax.batching.FlowControllerProvides flow control capability.
com.google.api.gax.batching.NumericThresholdA threshold which accumulates a count based on the provided ElementCounter.
com.google.api.gax.batching.PartitionKey
com.google.api.gax.batching.ThresholdBatcherQueues up elements until either a duration of time has passed or any threshold in a given set of thresholds is breached, and then delivers the elements in a batch to the consumer.
com.google.api.gax.batching.ThresholdBatcher.BuilderBuilder for a ThresholdBatcher.

Interfaces

InterfaceDescription
com.google.api.gax.batching.BatchMerger
com.google.api.gax.batching.BatchResourceRepresent the resource used by a batch including element and byte. It can also be extended to other things to determine if adding a new element needs to be flow controlled or if the current batch needs to be flushed.
com.google.api.gax.batching.BatcherRepresents a batching context where individual elements will be accumulated and flushed in a large batch request at some point in the future. The buffered elements can be flushed manually or when triggered by an internal threshold. This is intended to be used for high throughput scenarios at the cost of latency.
com.google.api.gax.batching.BatchingDescriptorAn adapter that packs and unpacks the elements in and out of batch requests and responses.

This interface should be implemented by either a service specific client or autogenerated by gapic-generator.

com.google.api.gax.batching.BatchingRequestBuilderAdapter to pack individual elements into a larger batch request.

The implementation for this interface will be implemented by service specific client or auto generated by the gapic-generator.

com.google.api.gax.batching.BatchingThresholdThe interface representing a threshold to be used in ThresholdBatcher. Thresholds do not need to be thread-safe if they are only used inside ThresholdBatcher.
com.google.api.gax.batching.ElementCounterInterface representing an object that provides a numerical count given an object of the parameterized type.
com.google.api.gax.batching.RequestBuilder
com.google.api.gax.batching.ThresholdBatchReceiverInterface representing an object that receives batches from a ThresholdBatcher and takes action on them. Implementations of ThresholdBatchReceiver should be thread-safe.

Enums

EnumDescription
com.google.api.gax.batching.FlowController.LimitExceededBehaviorEnumeration of behaviors that FlowController can use in case the flow control limits are exceeded.

Exceptions

ExceptionDescription
com.google.api.gax.batching.BatchingExceptionRepresents exception occurred during batching.
com.google.api.gax.batching.FlowController.FlowControlExceptionBase exception that signals a flow control state.
com.google.api.gax.batching.FlowController.FlowControlRuntimeExceptionRuntime exception that can be used in place of FlowControlException when an unchecked exception is required.
com.google.api.gax.batching.FlowController.MaxOutstandingElementCountReachedExceptionException thrown when client-side flow control is enforced based on the maximum number of outstanding in-memory elements.
com.google.api.gax.batching.FlowController.MaxOutstandingRequestBytesReachedExceptionException thrown when client-side flow control is enforced based on the maximum number of unacknowledged in-memory bytes.