K
- type of record keyV
- type of record valuepublic class Branched<K,V> extends Object
Branched
class is used to define the optional parameters when building branches with
BranchedKStream
.Modifier and Type | Method and Description |
---|---|
static <K,V> Branched<K,V> |
as(String name)
Create an instance of
Branched with provided branch name suffix. |
static <K,V> Branched<K,V> |
withConsumer(Consumer<? super KStream<K,V>> chain,
String name)
Create an instance of
Branched with provided chain consumer and branch name suffix. |
static <K,V> Branched<K,V> |
withConsumer(Consumer<KStream<K,V>> chain)
Create an instance of
Branched with provided chain consumer. |
static <K,V> Branched<K,V> |
withFunction(Function<? super KStream<K,V>,? extends KStream<K,V>> chain)
Create an instance of
Branched with provided chain function. |
static <K,V> Branched<K,V> |
withFunction(Function<? super KStream<K,V>,? extends KStream<K,V>> chain,
String name)
Create an instance of
Branched with provided chain function and branch name suffix. |
Branched<K,V> |
withName(String name)
Configure the instance of
Branched with a branch name suffix. |
public static <K,V> Branched<K,V> as(String name)
Branched
with provided branch name suffix.K
- key typeV
- value typename
- the branch name suffix to be used (see BranchedKStream
description for details)Branched
public static <K,V> Branched<K,V> withFunction(Function<? super KStream<K,V>,? extends KStream<K,V>> chain)
Branched
with provided chain function.K
- key typeV
- value typechain
- A function that will be applied to the branch. If the provided function returns
null
, its result is ignored, otherwise it is added to the Map
returned
by BranchedKStream.defaultBranch()
or BranchedKStream.noDefaultBranch()
(see
BranchedKStream
description for details).Branched
public static <K,V> Branched<K,V> withConsumer(Consumer<KStream<K,V>> chain)
Branched
with provided chain consumer.K
- key typeV
- value typechain
- A consumer to which the branch will be sent. If a consumer is provided,
the respective branch will not be added to the resulting Map
returned
by BranchedKStream.defaultBranch()
or BranchedKStream.noDefaultBranch()
(see
BranchedKStream
description for details).Branched
public static <K,V> Branched<K,V> withFunction(Function<? super KStream<K,V>,? extends KStream<K,V>> chain, String name)
Branched
with provided chain function and branch name suffix.K
- key typeV
- value typechain
- A function that will be applied to the branch. If the provided function returns
null
, its result is ignored, otherwise it is added to the Map
returned
by BranchedKStream.defaultBranch()
or BranchedKStream.noDefaultBranch()
(see
BranchedKStream
description for details).name
- the branch name suffix to be used. If null
, a default branch name suffix will be generated
(see BranchedKStream
description for details)Branched
public static <K,V> Branched<K,V> withConsumer(Consumer<? super KStream<K,V>> chain, String name)
Branched
with provided chain consumer and branch name suffix.K
- key typeV
- value typechain
- A consumer to which the branch will be sent. If a non-null consumer is provided,
the respective branch will not be added to the resulting Map
returned
by BranchedKStream.defaultBranch()
or BranchedKStream.noDefaultBranch()
(see
BranchedKStream
description for details).name
- the branch name suffix to be used. If null
, a default branch name suffix will be generated
(see BranchedKStream
description for details)Branched
public Branched<K,V> withName(String name)
Branched
with a branch name suffix.name
- the branch name suffix to be used. If null
a default branch name suffix will be generated (see
BranchedKStream
description for details)this