Interface SqsAsyncBatchManager.Builder
-
- All Known Implementing Classes:
DefaultSqsAsyncBatchManager.DefaultBuilder
- Enclosing interface:
- SqsAsyncBatchManager
public static interface SqsAsyncBatchManager.Builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SqsAsyncBatchManagerbuild()Builds an instance ofSqsAsyncBatchManagerbased on the supplied configurations.SqsAsyncBatchManager.Builderclient(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.SqsAsyncBatchManager.BuilderoverrideConfiguration(BatchOverrideConfiguration overrideConfiguration)Sets custom overrides for the BatchManager configuration.SqsAsyncBatchManager.BuilderscheduledExecutor(ScheduledExecutorService scheduledExecutor)Sets a customScheduledExecutorServicefor periodic buffer flushes.
-
-
-
Method Detail
-
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
SqsAsyncBatchManager.Builder client(SqsAsyncClient 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
SqsAsyncBatchManager.Builder scheduledExecutor(ScheduledExecutorService 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.
-
-