From 53adbe1114484f443be3709bf8b35b9e76a48d3a Mon Sep 17 00:00:00 2001 From: Thomas Crowley Date: Thu, 19 Dec 2024 11:57:51 +1100 Subject: [PATCH] Document io.factorhouse.kpow.StreamsRegistry --- src/java/io/factorhouse/kpow/StreamsRegistry.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/io/factorhouse/kpow/StreamsRegistry.java b/src/java/io/factorhouse/kpow/StreamsRegistry.java index 09f2001..2e211f1 100644 --- a/src/java/io/factorhouse/kpow/StreamsRegistry.java +++ b/src/java/io/factorhouse/kpow/StreamsRegistry.java @@ -91,6 +91,11 @@ public StreamsRegistry(Properties props) { this(props, MetricFilter.defaultMetricFilter()); } + /** + * Registers a Kafka Streams application with Kpow's StreamsRegistry. + * + * @return a StreamsAgent instance for the registered application (used to unregister). + */ public StreamsAgent register(KafkaStreams streams, Topology topology, KeyStrategy keyStrategy) { IFn require = Clojure.var("clojure.core", "require"); require.invoke(Clojure.read("io.factorhouse.kpow.agent")); @@ -103,6 +108,10 @@ public StreamsAgent register(KafkaStreams streams, Topology topology, KeyStrateg } } + /** + * Unregisters a Kafka Streams application with Kpow's StreamsRegistry. Use the StreamsAgent instance returned from + * the register method. + */ public void unregister(StreamsAgent streamsAgent) { if (streamsAgent != null) { IFn require = Clojure.var("clojure.core", "require");