Class CallbackConfig.Builder

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

public static class CallbackConfig.Builder extends Object
Builder for CallbackConfig.
  • Constructor Details

  • Method Details

    • timeout

      public CallbackConfig.Builder timeout(Duration timeout)
      Sets the maximum duration to wait for the callback to complete before timing out.
      Parameters:
      timeout - the timeout duration
      Returns:
      this builder for method chaining
    • heartbeatTimeout

      public CallbackConfig.Builder heartbeatTimeout(Duration heartbeatTimeout)
      Sets the maximum duration between heartbeats before the callback is considered failed.
      Parameters:
      heartbeatTimeout - the heartbeat timeout duration
      Returns:
      this builder for method chaining
    • serDes

      public CallbackConfig.Builder serDes(SerDes serDes)
      Sets a custom serializer for the callback.

      If not specified, the callback will use the default SerDes configured for the handler. This allows per-callback customization of serialization behavior, useful for callbacks 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 CallbackConfig build()
      Builds the CallbackConfig instance.