クラス SuperStreamBuilder

java.lang.ObjectSE
org.springframework.rabbit.stream.config.SuperStreamBuilder

public class SuperStreamBuilder extends ObjectSE
流れるような API を使用して Spring AMQP スーパーストリームを構築します。ストリームのドキュメントベース
導入:
3.1
作成者:
Sergei Kurenchuk, Gary Russell
  • コンストラクターの詳細

    • SuperStreamBuilder

      public SuperStreamBuilder()
  • メソッドの詳細

    • superStream

      public static SuperStreamBuilder superStream(StringSE name)
      スーパーストリームのビルダーを作成します。
      パラメーター:
      name - ストリーム名
      戻り値:
      ビルダー
    • superStream

      public static SuperStreamBuilder superStream(StringSE name, int partitions)
      スーパーストリームのビルダーを作成します。
      パラメーター:
      name - ストリーム名
      partitions - パーティション番号
      戻り値:
      ビルダー
    • maxAge

      public SuperStreamBuilder maxAge(StringSE maxAge)
      ストリームごとの最大保存期間を設定します。これにより、最も古いデータが削除されます。
      パラメーター:
      maxAge - 有効な単位: Y、M、D、h、m、s。たとえば: 1 週間の "7D"
      戻り値:
      ビルダー
    • maxLength

      public SuperStreamBuilder maxLength(long bytes)
      各ストリームの保持構成として最大ログサイズを設定します。これにより、データサイズに基づいてログが切り捨てられます。
      パラメーター:
      bytes - バイト単位の最大合計サイズ
      戻り値:
      ビルダー
    • maxSegmentSize

      public SuperStreamBuilder maxSegmentSize(long bytes)
      セグメントファイルの最大サイズ制限を設定します。
      パラメーター:
      bytes - バイト単位の最大セグメントサイズ
      戻り値:
      ビルダー
    • initialClusterSize

      public SuperStreamBuilder initialClusterSize(int count)
      各パーティションの初期レプリケーション係数を設定します。
      パラメーター:
      count - パーティションごとのノード数
      戻り値:
      ビルダー
    • withArgument

      public SuperStreamBuilder withArgument(StringSE key, ObjectSE value)
      ビルダーのメソッドではカバーされない追加の引数を設定します。
      パラメーター:
      key - 引数名
      value - 引数値
      戻り値:
      ビルダー
    • name

      public SuperStreamBuilder name(StringSE name)
      ストリーム名を設定します。
      パラメーター:
      name - ストリーム名。
      戻り値:
      ビルダー
    • partitions

      public SuperStreamBuilder partitions(int partitions)
      パーティション番号を設定します。
      パラメーター:
      partitions - パーティション番号
      戻り値:
      ビルダー
    • routingKeyStrategy

      public SuperStreamBuilder routingKeyStrategy(BiFunctionSE<StringSE,IntegerSE,ListSE<StringSE>> routingKeyStrategy)
      パーティションに使用するルーティングキーを決定する戦略を設定します。最初のパラメーターはキュー名、2 番目のパラメーターはパーティションの数です。返されるリストのサイズはパーティションと同じである必要があります。
      パラメーター:
      routingKeyStrategy - 戦略
      戻り値:
      ビルダー
    • build

      public SuperStream build()
      最終的なスーパーストリームを構築します。
      戻り値:
      スーパーストリームインスタンス