Package com.uber.cadence.client
Class WorkflowClientOptions.Builder
- java.lang.Object
-
- com.uber.cadence.client.WorkflowClientOptions.Builder
-
- Enclosing class:
- WorkflowClientOptions
public static final class WorkflowClientOptions.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkflowClientOptions
build()
WorkflowClientOptions.Builder
setContextPropagators(java.util.List<ContextPropagator> contextPropagators)
WorkflowClientOptions.Builder
setDataConverter(DataConverter dataConverter)
Used to override default (JSON) data converter implementation.WorkflowClientOptions.Builder
setDomain(java.lang.String domain)
WorkflowClientOptions.Builder
setIdentity(java.lang.String identity)
Override human readable identity of the worker.WorkflowClientOptions.Builder
setInterceptors(WorkflowClientInterceptor... interceptors)
Interceptor used to intercept workflow client calls.WorkflowClientOptions.Builder
setMetricsScope(com.uber.m3.tally.Scope metricsScope)
Sets the scope to be used for the workflow client for metrics reporting.WorkflowClientOptions.Builder
setQueryRejectCondition(QueryRejectCondition queryRejectCondition)
QueryRejectCondition is an optional field used to reject queries based on workflow state.
-
-
-
Method Detail
-
setDomain
public WorkflowClientOptions.Builder setDomain(java.lang.String domain)
-
setDataConverter
public WorkflowClientOptions.Builder setDataConverter(DataConverter dataConverter)
Used to override default (JSON) data converter implementation.- Parameters:
dataConverter
- data converter to serialize and deserialize arguments and return values. Not null.
-
setInterceptors
public WorkflowClientOptions.Builder setInterceptors(WorkflowClientInterceptor... interceptors)
Interceptor used to intercept workflow client calls.- Parameters:
interceptors
- not null
-
setMetricsScope
public WorkflowClientOptions.Builder setMetricsScope(com.uber.m3.tally.Scope metricsScope)
Sets the scope to be used for the workflow client for metrics reporting.- Parameters:
metricsScope
- the scope to be used. Not null.
-
setIdentity
public WorkflowClientOptions.Builder setIdentity(java.lang.String identity)
Override human readable identity of the worker. Identity is used to identify a worker and is recorded in the workflow history events. For example when a worker gets an activity task the correspondent ActivityTaskStarted event contains the worker identity as a field. Default is whatever(ManagementFactory.getRuntimeMXBean().getName()
returns.
-
setContextPropagators
public WorkflowClientOptions.Builder setContextPropagators(java.util.List<ContextPropagator> contextPropagators)
-
setQueryRejectCondition
public WorkflowClientOptions.Builder setQueryRejectCondition(QueryRejectCondition queryRejectCondition)
QueryRejectCondition is an optional field used to reject queries based on workflow state. QueryRejectConditionNotOpen will reject queries to workflows that are not open. QueryRejectConditionNotCompletedCleanly will reject queries to workflows that are not completed successfully. (e.g. terminated, canceled timeout etc...)Default is null, which means that queries will not be rejected based on workflow state.
-
build
public WorkflowClientOptions build()
-
-