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 ofSqsAsyncBatchManagerbased on the supplied configurations.client(SqsAsyncClient client) Sets a customSqsClientfor polling resources.default SqsAsyncBatchManager.BuilderoverrideConfiguration(Consumer<BatchOverrideConfiguration.Builder> overrideConfiguration) Sets custom overrides for the BatchManager configuration using aConsumerto configure the overrides.overrideConfiguration(BatchOverrideConfiguration overrideConfiguration) Sets custom overrides for the BatchManager configuration.scheduledExecutor(ScheduledExecutorService scheduledExecutor) Sets a customScheduledExecutorServicefor 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 aConsumerto configure the overrides.- Parameters:
overrideConfiguration- AConsumerto configure theBatchOverrideConfiguration.- Returns:
- This builder for method chaining.
-
client
Sets a customSqsClientfor 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 customScheduledExecutorServicefor 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 ofSqsAsyncBatchManagerbased on the supplied configurations.- Returns:
- An initialized SqsAsyncBatchManager.
-