Class StepConfig.Builder
java.lang.Object
software.amazon.lambda.durable.config.StepConfig.Builder
- Enclosing class:
- StepConfig
Builder for creating StepConfig instances.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(RetryStrategy retryStrategy, StepSemantics semantics, StepSemantics semanticsPerRetry, SerDes serDes) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the StepConfig instance.retryStrategy(RetryStrategy retryStrategy) Sets the retry strategy for the step.semantics(StepSemantics semantics) Deprecated, for removal: This API element is subject to removal in a future version.semanticsPerRetry(StepSemantics semanticsPerRetry) Sets the delivery semantics per retry for the step.Sets a custom serializer for the step.
-
Constructor Details
-
Builder
public Builder(RetryStrategy retryStrategy, StepSemantics semantics, StepSemantics semanticsPerRetry, SerDes serDes)
-
-
Method Details
-
retryStrategy
Sets the retry strategy for the step.- Parameters:
retryStrategy- the retry strategy to use, or null for default behavior- Returns:
- this builder for method chaining
-
semantics
Deprecated, for removal: This API element is subject to removal in a future version.UsesemanticsPerRetry(StepSemantics)instead. This method has incorrect behavior where AT_MOST_ONCE_PER_RETRY does not retry after step interruption.Sets the delivery semantics for the step.- Parameters:
semantics- the delivery semantics to use, defaults to AT_LEAST_ONCE_PER_RETRY if not specified- Returns:
- this builder for method chaining
-
semanticsPerRetry
Sets the delivery semantics per retry for the step.If set, this takes precedence over
semantics(StepSemantics).- Parameters:
semanticsPerRetry- the delivery semantics to use- Returns:
- this builder for method chaining
-
serDes
Sets a custom serializer for the step.If not specified, the step will use the default SerDes configured for the handler. This allows per-step customization of serialization behavior, useful for steps that need special handling (e.g., custom date formats, encryption, compression).
- Parameters:
serDes- the custom serializer to use, or null to use the default- Returns:
- this builder for method chaining
-
build
Builds the StepConfig instance.- Returns:
- a new StepConfig with the configured options
-
semanticsPerRetry(StepSemantics)instead.