クラス KafkaStreamsInteractiveQueryService
java.lang.ObjectSE
org.springframework.kafka.streams.KafkaStreamsInteractiveQueryService
Kafka ストリーム内のインタラクティブクエリストアを囲むラッパー API を提供します。この API を使用すると、アプリケーションは検討中の
KafkaStreams 内の名前付き状態ストアにアクセスできます。- 導入:
- 3.2
- 作成者:
- Soby Chacko, Stephane Nicoll
コンストラクターの概要
コンストラクターコンストラクター説明KafkaStreamsInteractiveQueryService(StreamsBuilderFactoryBean streamsBuilderFactoryBean) StreamsBuilderFactoryBean内の KafkaStreams から状態ストアを照会するためのインスタンスを構築します。メソッドのサマリー
修飾子と型メソッド説明@Nullable org.apache.kafka.streams.state.HostInfoこの Kafka ストリームアプリケーションが実行されている現在のHostInfoを取得します。<K> org.apache.kafka.streams.state.HostInfogetKafkaStreamsApplicationHostInfo(StringSE store, K key, org.apache.kafka.common.serialization.Serializer<K> serializer) 提供されたストアとキーがホストされているHostInfoを取得します。<T> TretrieveQueryableStore(StringSE storeName, org.apache.kafka.streams.state.QueryableStoreType<T> storeType) アプリケーションで作成された名前でクエリ可能なストアを取得して返します。voidsetRetryTemplate(RetryTemplate retryTemplate) CustomRetryTemplateprovided by the end users.
コンストラクターの詳細
KafkaStreamsInteractiveQueryService
StreamsBuilderFactoryBean内の KafkaStreams から状態ストアを照会するためのインスタンスを構築します。- パラメーター:
streamsBuilderFactoryBean-KafkaStreamsのStreamsBuilderFactoryBean。
メソッドの詳細
setRetryTemplate
CustomRetryTemplateprovided by the end users.- パラメーター:
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()Retrieve the currentHostInfowhere this Kafka Streams application is running on. This {link @HostInfo} is different from the Kafka `bootstrap.server` property and is based on the Kafka Streams configuration property `application.server` where user-defined REST endpoints can be invoked per each Kafka Streams application instance. If this property - `application.server` - is not available from the end-user application, then null is returned.- 戻り値:
- 現在の
HostInfo
getKafkaStreamsApplicationHostInfo
public <K> org.apache.kafka.streams.state.HostInfo getKafkaStreamsApplicationHostInfo(StringSE store, K key, org.apache.kafka.common.serialization.Serializer<K> serializer) Retrieve theHostInfowhere 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