Class DeadLetterQueue.Builder<K>

java.lang.Object
cloud.opencode.base.cache.dlq.DeadLetterQueue.Builder<K>
Type Parameters:
K - the key type | 键类型
Enclosing class:
DeadLetterQueue<K>

public static class DeadLetterQueue.Builder<K> extends Object
Builder for DeadLetterQueue DeadLetterQueue 构建器
Since:
JDK 25, opencode-base-cache V2.0.5
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • Builder

      public Builder()
      Creates a new Builder instance | 创建新的 Builder 实例
  • Method Details

    • maxRetries

      public DeadLetterQueue.Builder<K> maxRetries(int maxRetries)
      maxRetries | maxRetries
      Parameters:
      maxRetries - the maxRetries | maxRetries
      Returns:
      the result | 结果
    • initialBackoff

      public DeadLetterQueue.Builder<K> initialBackoff(Duration backoff)
      initialBackoff | initialBackoff
      Parameters:
      backoff - the backoff | backoff
      Returns:
      the result | 结果
    • maxBackoff

      public DeadLetterQueue.Builder<K> maxBackoff(Duration backoff)
      maxBackoff | maxBackoff
      Parameters:
      backoff - the backoff | backoff
      Returns:
      the result | 结果
    • backoffMultiplier

      public DeadLetterQueue.Builder<K> backoffMultiplier(double multiplier)
      backoffMultiplier | backoffMultiplier
      Parameters:
      multiplier - the multiplier | multiplier
      Returns:
      the result | 结果
    • maxQueueSize

      public DeadLetterQueue.Builder<K> maxQueueSize(int size)
      maxQueueSize | maxQueueSize
      Parameters:
      size - the size | size
      Returns:
      the result | 结果
    • retryLoader

      public DeadLetterQueue.Builder<K> retryLoader(Function<K,?> loader)
      Sets the retry loader | 设置重试加载器
      Parameters:
      loader - the retry loader function | 重试加载函数
      Returns:
      this builder | 此构建器
    • eventHandler

      eventHandler | eventHandler
      Parameters:
      handler - the handler | handler
      Returns:
      the result | 结果
    • build

      public DeadLetterQueue<K> build()
      build | build
      Returns:
      the result | 结果