Interface SqsAsyncBatchManager.Builder
- All Known Implementing Classes:
DefaultSqsAsyncBatchManager.DefaultBuilder
- Enclosing interface:
SqsAsyncBatchManager
public static interface SqsAsyncBatchManager.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an instance ofSqsAsyncBatchManager
based on the supplied configurations.client
(SqsAsyncClient client) Sets a customSqsClient
for polling resources.default SqsAsyncBatchManager.Builder
overrideConfiguration
(Consumer<BatchOverrideConfiguration.Builder> overrideConfiguration) Sets custom overrides for the BatchManager configuration using aConsumer
to configure the overrides.overrideConfiguration
(BatchOverrideConfiguration overrideConfiguration) Sets custom overrides for the BatchManager configuration.scheduledExecutor
(ScheduledExecutorService scheduledExecutor) Sets a customScheduledExecutorService
for periodic buffer flushes.
-
Method Details
-
overrideConfiguration
SqsAsyncBatchManager.Builder overrideConfiguration(BatchOverrideConfiguration overrideConfiguration) Sets custom overrides for the BatchManager configuration.- Parameters:
overrideConfiguration
- The configuration overrides.- Returns:
- This builder for method chaining.
-
overrideConfiguration
default SqsAsyncBatchManager.Builder overrideConfiguration(Consumer<BatchOverrideConfiguration.Builder> overrideConfiguration) Sets custom overrides for the BatchManager configuration using aConsumer
to configure the overrides.- Parameters:
overrideConfiguration
- AConsumer
to configure theBatchOverrideConfiguration
.- Returns:
- This builder for method chaining.
-
client
Sets a customSqsClient
for polling resources. This client must be closed by the caller.- Parameters:
client
- The SqsAsyncClient to use.- Returns:
- This builder for method chaining.
- Throws:
NullPointerException
- If client is null.
-
scheduledExecutor
Sets a customScheduledExecutorService
for periodic buffer flushes. This executor must be closed by the caller.- Parameters:
scheduledExecutor
- The executor to use.- Returns:
- This builder for method chaining.
-
build
SqsAsyncBatchManager build()Builds an instance ofSqsAsyncBatchManager
based on the supplied configurations.- Returns:
- An initialized SqsAsyncBatchManager.
-