Class BatcherFactory<RequestT,ResponseT> (2.23.3)

  public 
  
 final 
  
 class 
 BatcherFactory<RequestT 
 , 
 ResponseT 
> 

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.

Inheritance

java.lang.Object > BatcherFactory<RequestT,ResponseT>

Type Parameters

Name Description
RequestT
ResponseT

Constructors

BatcherFactory(BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatchingSettings batchingSettings, ScheduledExecutorService executor, FlowController flowController)

  public 
  
 BatcherFactory 
 ( 
 BatchingDescriptor<RequestT 
 , 
 ResponseT 
>  
 batchingDescriptor 
 , 
  
 BatchingSettings 
  
 batchingSettings 
 , 
  
 ScheduledExecutorService 
  
 executor 
 , 
  
 FlowController 
  
 flowController 
 ) 
 
Parameters
Name Description
batchingDescriptor BatchingDescriptor < RequestT , ResponseT >
batchingSettings BatchingSettings
executor ScheduledExecutorService
flowController FlowController

Methods

getBatchingSettings()

  public 
  
 BatchingSettings 
  
 getBatchingSettings 
 () 
 

Returns the BatchingSettings object that is associated with this factory.

This is public only for technical reasons, for advanced usage.

Returns
Type Description
BatchingSettings

getPushingBatcher(PartitionKey partitionKey)

  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.

Parameter
Name Description
partitionKey PartitionKey
Returns
Type Description
ThresholdBatcher < Batch < RequestT , ResponseT >>
Design a Mobile Site
View Site in Mobile | Classic
Share by: