Package com.tnsai.agents.resilience
Class AgentResilienceManager.Builder
java.lang.Object
com.tnsai.agents.resilience.AgentResilienceManager.Builder
- Enclosing class:
AgentResilienceManager
Builder for AgentResilienceManager.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the agent ID.build()Builds the AgentResilienceManager.deadLetterQueue(DeadLetterQueue queue) Sets the dead letter queue.recoveryManager(AgentRecoveryManager manager) Sets the recovery manager.resilienceExecutor(ResilienceExecutor executor) Sets the resilience executor.restartPolicy(AgentRestartPolicy policy) Sets the restart policy.retryPolicy(RetryPolicy policy) Sets the default retry policy.Sets the state recovery manager.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
agentId
Sets the agent ID.- Parameters:
agentId- the agent ID- Returns:
- this builder
-
resilienceExecutor
Sets the resilience executor.- Parameters:
executor- the executor- Returns:
- this builder
-
retryPolicy
Sets the default retry policy.- Parameters:
policy- the retry policy- Returns:
- this builder
-
deadLetterQueue
Sets the dead letter queue.- Parameters:
queue- the DLQ- Returns:
- this builder
-
recoveryManager
Sets the recovery manager.- Parameters:
manager- the recovery manager- Returns:
- this builder
-
restartPolicy
Sets the restart policy.- Parameters:
policy- the restart policy- Returns:
- this builder
-
stateRecoveryManager
Sets the state recovery manager.- Parameters:
manager- the state recovery manager- Returns:
- this builder
-
build
Builds the AgentResilienceManager.- Returns:
- new AgentResilienceManager instance
-