Add overloaded build method to StreamsBuilder
Reviewers: Guozhang Wang
@@ -41,6 +41,7 @@ import org.apache.kafka.streams.state.StoreBuilder;
import java.util.Collection;
import java.util.Collections;
import java.util.Objects;
+import java.util.Properties;
import java.util.regex.Pattern;
/**
@@ -513,10 +514,23 @@ public class StreamsBuilder {
/**
* Returns the {@link Topology} that represents the specified processing logic.
+ * Note that using this method means no optimizations are performed.
*
* @return the {@link Topology} that represents the specified processing logic
*/
public synchronized Topology build() {
+ return build(null);
+ }
+
+ /**
+ * Returns the {@link Topology} that represents the specified processing logic and accepts
+ * a {@link Properties} instance used to indicate whether to optimize topology or not.
+ *
+ * @param props the {@link Properties} used for building possibly optimized topology
+ * @return the {@link Topology} that represents the specified processing logic
+ */
+ public synchronized Topology build(final Properties props) {
+ // the props instance will be used once optimization framework merged
return topology;
}
}
