クラス KafkaStreamsInteractiveQueryService

java.lang.ObjectSE
org.springframework.kafka.streams.KafkaStreamsInteractiveQueryService

public class KafkaStreamsInteractiveQueryService extends ObjectSE
Kafka ストリーム内のインタラクティブクエリストアを囲むラッパー API を提供します。この API を使用すると、アプリケーションは検討中の KafkaStreams 内の名前付き状態ストアにアクセスできます。
導入:
3.2
作成者:
Soby Chacko, Stephane Nicoll
  • コンストラクターの詳細

  • メソッドの詳細

    • setRetryTemplate

      public void setRetryTemplate(RetryTemplate retryTemplate)
      エンドユーザーが提供するカスタム RetryTemplate
      パラメーター:
      retryTemplate - RetryTemplate
    • retrieveQueryableStore

      public <T> T retrieveQueryableStore(StringSE storeName, org.apache.kafka.streams.state.QueryableStoreType<T> storeType)
      アプリケーションで作成された名前でクエリ可能なストアを取得して返します。
      型パラメーター:
      T - クエリ可能なストアの汎用型
      パラメーター:
      storeName - クエリ可能なストアの名前
      storeType - クエリ可能なストアの型
      戻り値:
      クエリ可能なストア。
    • getCurrentKafkaStreamsApplicationHostInfo

      public @Nullable org.apache.kafka.streams.state.HostInfo getCurrentKafkaStreamsApplicationHostInfo()
      この Kafka Streams アプリケーションが実行中の現在の HostInfo を取得します。この {link @HostInfo} は Kafka の `bootstrap.server` プロパティとは異なり、Kafka Streams の構成プロパティ "application.server" に基づいています。このプロパティでは、Kafka Streams アプリケーションインスタンスごとにユーザー定義の REST エンドポイントを呼び出すことができます。このプロパティ "application.server" がエンドユーザーアプリケーションから利用できない場合は、null が返されます。
      戻り値:
      現在の HostInfo
    • getKafkaStreamsApplicationHostInfo

      public <K> org.apache.kafka.streams.state.HostInfo getKafkaStreamsApplicationHostInfo(StringSE store, K key, org.apache.kafka.common.serialization.Serializer<K> serializer)
      Retrieve the HostInfo where the provided store and key are hosted on. This may not be the current host that is running the application. Kafka Streams will look through all the consumer instances under the same application id and retrieve the proper host. Note that the end user applications must provide `application.server` as a configuration property for all the application instances when calling this method. If this is not available, then null maybe returned.
      型パラメーター:
      K - キーの汎用型
      パラメーター:
      store - 店名
      key - 探すための鍵
      serializer - キーの Serializer 
      戻り値:
      提供されたストアのキーが現在ホストされている HostInfo