A - a representation of an action command that is shared across all actions in the saga. This is typically a generic type, such as Json, or if using Avro serialization, SpecificRecord or GenericRecordpublic final class SagaClientBuilder<A> extends Object
| Constructor and Description |
|---|
SagaClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SagaAPI<A> |
build()
Builds the saga API.
|
static <A> SagaClientBuilder<A> |
create()
Create saga client builder.
|
static <A> SagaClientBuilder<A> |
create(PropertiesBuilder.BuildSteps configBuildSteps)
Create saga client builder with config properties.
|
SagaClientBuilder<A> |
withClientId(String clientId)
With client id saga client builder.
|
SagaClientBuilder<A> |
withProperties(PropertiesBuilder.BuildSteps configBuildSteps)
Sets the config properties.
|
SagaClientBuilder<A> |
withScheduler(ScheduledExecutorService scheduler)
Sets the scheduler required to schedule timeouts.
|
SagaClientBuilder<A> |
withSerdes(SagaClientSerdes<A> serdes)
Sets the Serdes required for the saga request and saga response topics.
|
SagaClientBuilder<A> |
withTopicConfig(TopicConfigBuilder.BuildSteps topicBuildFn)
Sets the topic configuration for naming and creating the saga request and response topics.
|
public static <A> SagaClientBuilder<A> create()
A - a representation of an action command that is shared across all actions in the saga. This is typically a generic type, such as Json, or if using Avro serialization, SpecificRecord or GenericRecordpublic static <A> SagaClientBuilder<A> create(PropertiesBuilder.BuildSteps configBuildSteps)
A - a representation of an action command that is shared across all actions in the saga. This is typically a generic type, such as Json, or if using Avro serialization, SpecificRecord or GenericRecordconfigBuildSteps - a function that allows setting Kafka config properties incrementally.public SagaClientBuilder<A> withProperties(PropertiesBuilder.BuildSteps configBuildSteps)
configBuildSteps - a sequence of configuration stepspublic SagaClientBuilder<A> withSerdes(SagaClientSerdes<A> serdes)
serdes - the serdes for the actionpublic SagaClientBuilder<A> withScheduler(ScheduledExecutorService scheduler)
scheduler - the schedulerpublic SagaClientBuilder<A> withTopicConfig(TopicConfigBuilder.BuildSteps topicBuildFn)
topicBuildFn - a function to set topic configuration details incrementally.public SagaClientBuilder<A> withClientId(String clientId)
clientId - the client idCopyright © 2019. All rights reserved.