public class InteractiveQueryService extends Object
Constructor and Description |
---|
InteractiveQueryService(KafkaStreamsRegistry kafkaStreamsRegistry,
KafkaStreamsBinderConfigurationProperties binderConfigurationProperties)
Constructor for InteractiveQueryService.
|
Modifier and Type | Method and Description |
---|---|
List<org.apache.kafka.streams.state.HostInfo> |
getAllHostsInfo(String store)
Gets the list of
HostInfo where the provided store is hosted on. |
org.apache.kafka.streams.state.HostInfo |
getCurrentHostInfo()
Gets the current
HostInfo that the calling kafka streams application is
running on. |
<K> org.apache.kafka.streams.state.HostInfo |
getHostInfo(String store,
K key,
org.apache.kafka.common.serialization.Serializer<K> serializer)
Gets the
HostInfo where the provided store and key are hosted on. |
<T> T |
getQueryableStore(String storeName,
org.apache.kafka.streams.state.QueryableStoreType<T> storeType)
Retrieve and return a queryable store by name created in the application.
|
public InteractiveQueryService(KafkaStreamsRegistry kafkaStreamsRegistry, KafkaStreamsBinderConfigurationProperties binderConfigurationProperties)
kafkaStreamsRegistry
- holding KafkaStreamsRegistry
binderConfigurationProperties
- kafka Streams binder configuration propertiespublic <T> T getQueryableStore(String storeName, org.apache.kafka.streams.state.QueryableStoreType<T> storeType)
T
- generic queryable storestoreName
- name of the queryable storestoreType
- type of the queryable storepublic org.apache.kafka.streams.state.HostInfo getCurrentHostInfo()
HostInfo
that the calling kafka streams application is
running on.
Note that the end user applications must provide `applicaiton.server` as a
configuration property when calling this method. If this is not available, then
null is returned.HostInfo
public <K> org.apache.kafka.streams.state.HostInfo getHostInfo(String store, K key, org.apache.kafka.common.serialization.Serializer<K> serializer)
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 retrieves the
proper host.
Note that the end user applications must provide `applicaiton.server` as a
configuration property for all the application instances when calling this method.
If this is not available, then null maybe returned.K
- generic type for keystore
- store namekey
- key to look forserializer
- Serializer
for the keyHostInfo
where the key for the provided store is hosted
currentlypublic List<org.apache.kafka.streams.state.HostInfo> getAllHostsInfo(String store)
HostInfo
where the provided store is hosted on.
It also can include current host info.
Kafka Streams will look through all the consumer instances under the same application id
and retrieves all hosts info.
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 an empty list will be returned.store
- store nameHostInfo
where provided store is hosted onCopyright © 2020 Pivotal Software, Inc.. All rights reserved.