Package com.google.api.gax.rpc
Class BatcherFactory<RequestT,ResponseT>
- java.lang.Object
-
- com.google.api.gax.rpc.BatcherFactory<RequestT,ResponseT>
-
@InternalApi public final class BatcherFactory<RequestT,ResponseT> extends Object
A Factory class which, for each unique partitionKey, creates a trio including a ThresholdBatcher, BatchExecutor, and ThresholdBatchingForwarder. The ThresholdBatchingForwarder pulls items from the ThresholdBatcher and forwards them to the BatchExecutor for processing.This is public only for technical reasons, for advanced usage.
-
-
Constructor Summary
Constructors Constructor Description BatcherFactory(BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatchingSettings batchingSettings, ScheduledExecutorService executor, FlowController flowController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchingSettingsgetBatchingSettings()Returns the BatchingSettings object that is associated with this factory.ThresholdBatcher<Batch<RequestT,ResponseT>>getPushingBatcher(PartitionKey partitionKey)Provides the ThresholdBatcher corresponding to the given partitionKey, or constructs one if it doesn't exist yet.
-
-
-
Constructor Detail
-
BatcherFactory
public BatcherFactory(BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatchingSettings batchingSettings, ScheduledExecutorService executor, FlowController flowController)
-
-
Method Detail
-
getPushingBatcher
public ThresholdBatcher<Batch<RequestT,ResponseT>> getPushingBatcher(PartitionKey partitionKey)
Provides the ThresholdBatcher corresponding to the given partitionKey, or constructs one if it doesn't exist yet. The implementation is thread-safe.
-
getBatchingSettings
@InternalApi public BatchingSettings getBatchingSettings()
Returns the BatchingSettings object that is associated with this factory.This is public only for technical reasons, for advanced usage.
-
-