BatchRequestService.Builder

public static class BatchRequestService.Builder extends Object

Builder object for creating an instance of BatchRequestService

Public Constructor Summary

BatchRequestService.Builder(AbstractGoogleJsonClient service)
Creates Builder to construct BatchRequestService for batching requests for AbstractGoogleJsonClient service.

Public Method Summary

BatchRequestService
build()
Creates an instance of BatchRequestService.
BatchRequestService.Builder
setBatchPolicy(BatchPolicy flushPolicy)
Sets BatchPolicy for request batching.
BatchRequestService.Builder
setBatchRequestHelper(BatchRequestService.BatchRequestHelper batchRequestHelper)
Sets helper object which allows dependency injection for unit tests.
BatchRequestService.Builder
setExecutorFactory(BatchRequestService.ExecutorFactory executorFactory)
Sets BatchRequestService.ExecutorFactory to be used to create instance of ExecutorService to be used to execute batched requests asynchronously.
BatchRequestService.Builder
setGoogleCredential(GoogleCredential credential)
Sets credentials to be used for executing BatchRequest
BatchRequestService.Builder
setRetryPolicy(RetryPolicy retryPolicy)
Sets RetryPolicy for exponential back off and error handling for failed requests.
BatchRequestService.Builder
setTimeProvider(BatchRequestService.TimeProvider timeProvider)
Sets BatchRequestService.TimeProvider to compute current time used for auto flushing batch requests.

Inherited Method Summary

Public Constructors

public BatchRequestService.Builder (AbstractGoogleJsonClient service)

Creates Builder to construct BatchRequestService for batching requests for AbstractGoogleJsonClient service.

Parameters
service instance to create batch request for.

Public Methods

public BatchRequestService build ()

Creates an instance of BatchRequestService.

Returns

public BatchRequestService.Builder setBatchPolicy (BatchPolicy flushPolicy)

Sets BatchPolicy for request batching.

Parameters
flushPolicy BatchPolicy for request batching.

public BatchRequestService.Builder setBatchRequestHelper (BatchRequestService.BatchRequestHelper batchRequestHelper)

Sets helper object which allows dependency injection for unit tests.

Parameters
batchRequestHelper helper object which allows dependency injection for unit tests.

public BatchRequestService.Builder setExecutorFactory (BatchRequestService.ExecutorFactory executorFactory)

Sets BatchRequestService.ExecutorFactory to be used to create instance of ExecutorService to be used to execute batched requests asynchronously.

Parameters
executorFactory BatchRequestService.ExecutorFactory to be used

public BatchRequestService.Builder setGoogleCredential (GoogleCredential credential)

Sets credentials to be used for executing BatchRequest

Parameters
credential to be used for executing BatchRequest

public BatchRequestService.Builder setRetryPolicy (RetryPolicy retryPolicy)

Sets RetryPolicy for exponential back off and error handling for failed requests.

Parameters
retryPolicy RetryPolicy for exponential back off and error handling for failed requests

public BatchRequestService.Builder setTimeProvider (BatchRequestService.TimeProvider timeProvider)

Sets BatchRequestService.TimeProvider to compute current time used for auto flushing batch requests.

Parameters
timeProvider BatchRequestService.TimeProvider to get current time.

Skicka feedback om ...