Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
public class Produced<K, V> {
	protected String topicName;
	protected Boolean topicCreated = false;
	protected Boolean repartitionNeeded = true;
	protected Boolean useAsInternalTopicOnly = true;
 	protected Integer partitions; 
	protected Produced(String topicName, Boolean alreadyCreated) {
    	this.topicName = topicName;
   	    this.alreadyCreated = alreadyCreated;
	}
 
	protected Produced(String topicName, Integer partitions) {
    	this.topicName = topicName;
   	    this.partitions = partitions;
	}

 
	public static <K, V> Produced<K, V> withTopic(String topicName, Boolean alreadyCreated) {
    	return new Produced<>(topicName, alreadyCreated);
	}
 
	public static <K, V> Produced<K, V> withTopic(String topicName, Integer partitions) {
    	return new Produced<>(topicName, partitions);
	}

	public Produced<K, V> repartitionNeeded(Boolean repartitionNeeded) {
		this.repartitionNeeded = repartitionNeeded;
		return this;
	}
 
	public Produced<K, V> useAsInternalTopicOnly(Boolean useAsInternalTopicOnly) {
		this.useAsInternalTopicOnly = useAsInternalTopicOnly;
		return this;
	}
}

 

Public interfaces

 

We try to avoid many overloads by not implementing all the overloaded combinations of related methods.

 

KStream

 

Code Block
languagejava
 KStream<K, V> through(final Produced topicInfo);
 void to(final Produced topicInfo);

...