Class StepConfig.Builder

java.lang.Object
software.amazon.lambda.durable.config.StepConfig.Builder
Enclosing class:
StepConfig

public static class StepConfig.Builder extends Object
Builder for creating StepConfig instances.
  • Constructor Details

  • Method Details

    • retryStrategy

      public StepConfig.Builder retryStrategy(RetryStrategy 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(forRemoval=true) public StepConfig.Builder semantics(StepSemantics semantics)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use semanticsPerRetry(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

      public StepConfig.Builder semanticsPerRetry(StepSemantics 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

      public StepConfig.Builder serDes(SerDes 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

      public StepConfig build()
      Builds the StepConfig instance.
      Returns:
      a new StepConfig with the configured options