diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryServices.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryService.java similarity index 95% rename from spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryServices.java rename to spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryService.java index 5224f34d5..ab06a1900 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryServices.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/InteractiveQueryService.java @@ -39,7 +39,7 @@ import org.springframework.util.StringUtils; * @author Renwei Han * @since 2.1.0 */ -public class InteractiveQueryServices { +public class InteractiveQueryService { private final KafkaStreamsRegistry kafkaStreamsRegistry; private final KafkaStreamsBinderConfigurationProperties binderConfigurationProperties; @@ -49,8 +49,8 @@ public class InteractiveQueryServices { * @param kafkaStreamsRegistry holding {@link KafkaStreamsRegistry} * @param binderConfigurationProperties Kafka Streams binder configuration properties */ - public InteractiveQueryServices(KafkaStreamsRegistry kafkaStreamsRegistry, - KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { + public InteractiveQueryService(KafkaStreamsRegistry kafkaStreamsRegistry, + KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { this.kafkaStreamsRegistry = kafkaStreamsRegistry; this.binderConfigurationProperties = binderConfigurationProperties; } diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java index 0de6e9d62..e30a77e79 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsBinderSupportAutoConfiguration.java @@ -149,9 +149,9 @@ public class KafkaStreamsBinderSupportAutoConfiguration { } @Bean - public InteractiveQueryServices interactiveQueryServices(KafkaStreamsRegistry kafkaStreamsRegistry, + public InteractiveQueryService interactiveQueryServices(KafkaStreamsRegistry kafkaStreamsRegistry, KafkaStreamsBinderConfigurationProperties binderConfigurationProperties) { - return new InteractiveQueryServices(kafkaStreamsRegistry, binderConfigurationProperties); + return new InteractiveQueryService(kafkaStreamsRegistry, binderConfigurationProperties); } @Bean diff --git a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java index 5a7685c0b..c41e8ff5f 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java +++ b/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/QueryableStoreRegistry.java @@ -27,7 +27,7 @@ import org.apache.kafka.streams.state.QueryableStoreType; * @author Soby Chacko * @author Renwei Han * @since 2.0.0 - * @deprecated in favor of {@link InteractiveQueryServices} + * @deprecated in favor of {@link InteractiveQueryService} */ public class QueryableStoreRegistry { @@ -44,7 +44,7 @@ public class QueryableStoreRegistry { * @param storeType type of the queryable store * @param generic queryable store * @return queryable store. - * @deprecated in favor of {@link InteractiveQueryServices#getQueryableStore(String, QueryableStoreType)} + * @deprecated in favor of {@link InteractiveQueryService#getQueryableStore(String, QueryableStoreType)} */ public T getQueryableStoreType(String storeName, QueryableStoreType storeType) { diff --git a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsInteractiveQueryIntegrationTests.java b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsInteractiveQueryIntegrationTests.java index 141b33cd9..6182d0f86 100644 --- a/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsInteractiveQueryIntegrationTests.java +++ b/spring-cloud-stream-binder-kafka-streams/src/test/java/org/springframework/cloud/stream/binder/kafka/streams/KafkaStreamsInteractiveQueryIntegrationTests.java @@ -112,15 +112,15 @@ public class KafkaStreamsInteractiveQueryIntegrationTests { ProductCountApplication.Foo foo = context.getBean(ProductCountApplication.Foo.class); assertThat(foo.getProductStock(123).equals(1L)); - //perform assertions on HostInfo related methods in InteractiveQueryServices - InteractiveQueryServices interactiveQueryServices = context.getBean(InteractiveQueryServices.class); - HostInfo currentHostInfo = interactiveQueryServices.getCurrentHostInfo(); + //perform assertions on HostInfo related methods in InteractiveQueryService + InteractiveQueryService interactiveQueryService = context.getBean(InteractiveQueryService.class); + HostInfo currentHostInfo = interactiveQueryService.getCurrentHostInfo(); assertThat(currentHostInfo.host() + ":" + currentHostInfo.port()).isEqualTo(embeddedKafka.getBrokersAsString()); - HostInfo hostInfo = interactiveQueryServices.getHostInfo("prod-id-count-store", 123, new IntegerSerializer()); + HostInfo hostInfo = interactiveQueryService.getHostInfo("prod-id-count-store", 123, new IntegerSerializer()); assertThat(hostInfo.host() + ":" + hostInfo.port()).isEqualTo(embeddedKafka.getBrokersAsString()); - HostInfo hostInfoFoo = interactiveQueryServices.getHostInfo("prod-id-count-store-foo", 123, new IntegerSerializer()); + HostInfo hostInfoFoo = interactiveQueryService.getHostInfo("prod-id-count-store-foo", 123, new IntegerSerializer()); assertThat(hostInfoFoo).isNull(); } @@ -143,20 +143,20 @@ public class KafkaStreamsInteractiveQueryIntegrationTests { } @Bean - public Foo foo(InteractiveQueryServices interactiveQueryServices) { - return new Foo(interactiveQueryServices); + public Foo foo(InteractiveQueryService interactiveQueryService) { + return new Foo(interactiveQueryService); } static class Foo { - InteractiveQueryServices interactiveQueryServices; + InteractiveQueryService interactiveQueryService; - Foo(InteractiveQueryServices interactiveQueryServices) { - this.interactiveQueryServices = interactiveQueryServices; + Foo(InteractiveQueryService interactiveQueryService) { + this.interactiveQueryService = interactiveQueryService; } public Long getProductStock(Integer id) { ReadOnlyKeyValueStore keyValueStore = - interactiveQueryServices.getQueryableStore("prod-id-count-store", QueryableStoreTypes.keyValueStore()); + interactiveQueryService.getQueryableStore("prod-id-count-store", QueryableStoreTypes.keyValueStore()); return (Long) keyValueStore.get(id); }