@ -70,10 +70,6 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
@@ -70,10 +70,6 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
this . processorName = processorName ;
}
/ * *
* Create an instance of { @link Consumed } from an existing instance .
* @param consumed the instance of { @link Consumed } to copy
* /
protected Consumed ( final Consumed < K , V > consumed ) {
this ( consumed . keySerde ,
consumed . valueSerde ,
@ -86,12 +82,18 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
@@ -86,12 +82,18 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
/ * *
* Create an instance of { @link Consumed } with the supplied arguments . { @code null } values are acceptable .
*
* @param keySerde the key serde . If { @code null } the default key serde from config will be used
* @param valueSerde the value serde . If { @code null } the default value serde from config will be used
* @param timestampExtractor the timestamp extractor to used . If { @code null } the default timestamp extractor from config will be used
* @param resetPolicy the offset reset policy to be used . If { @code null } the default reset policy from config will be used
* @param < K > key type
* @param < V > value type
* @param keySerde
* the key serde . If { @code null } the default key serde from config will be used
* @param valueSerde
* the value serde . If { @code null } the default value serde from config will be used
* @param timestampExtractor
* the timestamp extractor to used . If { @code null } the default timestamp extractor from config will be used
* @param resetPolicy
* the offset reset policy to be used . If { @code null } the default reset policy from config will be used
*
* @param < K > key type
* @param < V > value type
*
* @return a new instance of { @link Consumed }
* /
public static < K , V > Consumed < K , V > with ( final Serde < K > keySerde ,
@ -99,16 +101,19 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
@@ -99,16 +101,19 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
final TimestampExtractor timestampExtractor ,
final Topology . AutoOffsetReset resetPolicy ) {
return new Consumed < > ( keySerde , valueSerde , timestampExtractor , resetPolicy , null ) ;
}
/ * *
* Create an instance of { @link Consumed } with key and value { @link Serde } s .
*
* @param keySerde the key serde . If { @code null } the default key serde from config will be used
* @param valueSerde the value serde . If { @code null } the default value serde from config will be used
* @param < K > key type
* @param < V > value type
* @param keySerde
* the key serde . If { @code null } the default key serde from config will be used
* @param valueSerde
* the value serde . If { @code null } the default value serde from config will be used
*
* @param < K > key type
* @param < V > value type
*
* @return a new instance of { @link Consumed }
* /
public static < K , V > Consumed < K , V > with ( final Serde < K > keySerde ,
@ -119,9 +124,12 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
@@ -119,9 +124,12 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
/ * *
* Create an instance of { @link Consumed } with a { @link TimestampExtractor } .
*
* @param timestampExtractor the timestamp extractor to used . If { @code null } the default timestamp extractor from config will be used
* @param < K > key type
* @param < V > value type
* @param timestampExtractor
* the timestamp extractor to used . If { @code null } the default timestamp extractor from config will be used
*
* @param < K > key type
* @param < V > value type
*
* @return a new instance of { @link Consumed }
* /
public static < K , V > Consumed < K , V > with ( final TimestampExtractor timestampExtractor ) {
@ -131,9 +139,12 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
@@ -131,9 +139,12 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
/ * *
* Create an instance of { @link Consumed } with a { @link org . apache . kafka . streams . Topology . AutoOffsetReset Topology . AutoOffsetReset } .
*
* @param resetPolicy the offset reset policy to be used . If { @code null } the default reset policy from config will be used
* @param < K > key type
* @param < V > value type
* @param resetPolicy
* the offset reset policy to be used . If { @code null } the default reset policy from config will be used
*
* @param < K > key type
* @param < V > value type
*
* @return a new instance of { @link Consumed }
* /
public static < K , V > Consumed < K , V > with ( final Topology . AutoOffsetReset resetPolicy ) {
@ -143,9 +154,12 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
@@ -143,9 +154,12 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
/ * *
* Create an instance of { @link Consumed } with provided processor name .
*
* @param processorName the processor name to be used . If { @code null } a default processor name will be generated
* @param < K > key type
* @param < V > value type
* @param processorName
* the processor name to be used . If { @code null } a default processor name will be generated
*
* @param < K > key type
* @param < V > value type
*
* @return a new instance of { @link Consumed }
* /
public static < K , V > Consumed < K , V > as ( final String processorName ) {
@ -155,57 +169,62 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
@@ -155,57 +169,62 @@ public class Consumed<K, V> implements NamedOperation<Consumed<K, V>> {
/ * *
* Configure the instance of { @link Consumed } with a key { @link Serde } .
*
* @param keySerde the key serde . If { @code null } the default key serde from config will be used
* @return this
* @param keySerde
* the key serde . If { @code null } the default key serde from config will be used
*
* @return a new instance of { @link Consumed }
* /
public Consumed < K , V > withKeySerde ( final Serde < K > keySerde ) {
this . keySerde = keySerde ;
return this ;
return new Consumed < K , V > ( keySerde , valueSerde , timestampExtractor , resetPolicy , processorName ) ;
}
/ * *
* Configure the instance of { @link Consumed } with a value { @link Serde } .
*
* @param valueSerde the value serde . If { @code null } the default value serde from config will be used
* @return this
* @param valueSerde
* the value serde . If { @code null } the default value serde from config will be used
*
* @return a new instance of { @link Consumed }
* /
public Consumed < K , V > withValueSerde ( final Serde < V > valueSerde ) {
this . valueSerde = valueSerde ;
return this ;
return new Consumed < K , V > ( keySerde , valueSerde , timestampExtractor , resetPolicy , processorName ) ;
}
/ * *
* Configure the instance of { @link Consumed } with a { @link TimestampExtractor } .
*
* @param timestampExtractor the timestamp extractor to used . If { @code null } the default timestamp extractor from config will be used
* @return this
* @param timestampExtractor
* the timestamp extractor to used . If { @code null } the default timestamp extractor from config will be used
*
* @return a new instance of { @link Consumed }
* /
public Consumed < K , V > withTimestampExtractor ( final TimestampExtractor timestampExtractor ) {
this . timestampExtractor = timestampExtractor ;
return this ;
return new Consumed < K , V > ( keySerde , valueSerde , timestampExtractor , resetPolicy , processorName ) ;
}
/ * *
* Configure the instance of { @link Consumed } with a { @link org . apache . kafka . streams . Topology . AutoOffsetReset Topology . AutoOffsetReset } .
*
* @param resetPolicy the offset reset policy to be used . If { @code null } the default reset policy from config will be used
* @return this
* @param resetPolicy
* the offset reset policy to be used . If { @code null } the default reset policy from config will be used
*
* @return a new instance of { @link Consumed }
* /
public Consumed < K , V > withOffsetResetPolicy ( final Topology . AutoOffsetReset resetPolicy ) {
this . resetPolicy = resetPolicy ;
return this ;
return new Consumed < K , V > ( keySerde , valueSerde , timestampExtractor , resetPolicy , processorName ) ;
}
/ * *
* Configure the instance of { @link Consumed } with a processor name .
*
* @param processorName the processor name to be used . If { @code null } a default processor name will be generated
* @return this
* @param processorName
* the processor name to be used . If { @code null } a default processor name will be generated
*
* @return a new instance of { @link Consumed }
* /
@Override
public Consumed < K , V > withName ( final String processorName ) {
this . processorName = processorName ;
return this ;
return new Consumed < K , V > ( keySerde , valueSerde , timestampExtractor , resetPolicy , processorName ) ;
}
@Override