Class FlowTimeoutHandlerOptions.Builder
java.lang.Object
io.superdurable.dex.FlowTimeoutHandlerOptions.Builder
- Enclosing class:
FlowTimeoutHandlerOptions
Builds immutable
FlowTimeoutHandlerOptions values.-
Method Summary
Modifier and TypeMethodDescriptionaddLoadAttributeMap(AttributeMap<?> value) Loads every current instance of an AttributeMap.addLoadAttributeMapInstance(AttributeMap<?> value, String instance) Loads one AttributeMap instance.addLoadChannel(Channel<?> value) Loads pending messages from one Channel.addLoadChannelMap(ChannelMap<?> value) Loads pending messages from every current ChannelMap instance.addLoadChannelMapInstance(ChannelMap<?> value, String instance) Loads pending messages from one ChannelMap instance.addLock(AttributeLock value) Adds an Attribute lock held for the handler invocation.build()Builds immutable timeout-handler options.durability(StepDurability value) Overrides durability for timeout-handler side effects.heartbeatTimeout(Duration value) Sets the heartbeat timeout for regular timeout-handler attempts.methodTimeout(Duration value) Sets the maximum duration of one timeout-handler attempt.onFailureProceedTo(Class<? extends Step<Void>> stepClass) Routes exhausted timeout-handler failures to a registered no-input Step.onFailureProceedTo(Class<? extends Step<Void>> stepClass, StepOptions options) Routes exhausted failures to a no-input Step with execution overrides.retry(RetryPolicy value) Sets retry behavior for timeout-handler failures.
-
Method Details
-
methodTimeout
Sets the maximum duration of one timeout-handler attempt.- Parameters:
value- the timeout, ornullfor the server default- Returns:
- this builder
-
heartbeatTimeout
Sets the heartbeat timeout for regular timeout-handler attempts.- Parameters:
value- a positive whole-second duration, ornullfor the server default- Returns:
- this builder
-
retry
Sets retry behavior for timeout-handler failures.- Parameters:
value- the retry policy, ornullfor server defaults- Returns:
- this builder
-
onFailureProceedTo
Routes exhausted timeout-handler failures to a registered no-input Step.The Step receives
nulland reads the final error throughContext.getRecoveryError().- Parameters:
stepClass- the recovery Step class withVoidinput- Returns:
- this builder
-
onFailureProceedTo
public FlowTimeoutHandlerOptions.Builder onFailureProceedTo(Class<? extends Step<Void>> stepClass, StepOptions options) Routes exhausted failures to a no-input Step with execution overrides.- Parameters:
stepClass- the recovery Step class withVoidinputoptions- recovery execution options, ornullfor registered defaults- Returns:
- this builder
-
durability
Overrides durability for timeout-handler side effects.- Parameters:
value- the durability mode; the default isStepDurability.DEFAULT- Returns:
- this builder
-
addLock
Adds an Attribute lock held for the handler invocation.- Parameters:
value- the lock definition- Returns:
- this builder
-
addLoadAttributeMap
Loads every current instance of an AttributeMap.- Parameters:
value- an AttributeMap registered by the Flow- Returns:
- this builder
-
addLoadAttributeMapInstance
public FlowTimeoutHandlerOptions.Builder addLoadAttributeMapInstance(AttributeMap<?> value, String instance) Loads one AttributeMap instance.- Parameters:
value- an AttributeMap registered by the Flowinstance- the slash-free instance key- Returns:
- this builder
-
addLoadChannel
Loads pending messages from one Channel.- Parameters:
value- a Channel registered by the Flow- Returns:
- this builder
-
addLoadChannelMap
Loads pending messages from every current ChannelMap instance.- Parameters:
value- a ChannelMap registered by the Flow- Returns:
- this builder
-
addLoadChannelMapInstance
public FlowTimeoutHandlerOptions.Builder addLoadChannelMapInstance(ChannelMap<?> value, String instance) Loads pending messages from one ChannelMap instance.- Parameters:
value- a ChannelMap registered by the Flowinstance- the slash-free instance key- Returns:
- this builder
-
build
Builds immutable timeout-handler options.- Returns:
- the configured options
-