Package org.bsc.langgraph4j.hook
Class RetryPolicy
java.lang.Object
org.bsc.langgraph4j.hook.RetryPolicy
Retries a node action when a configured failure occurs.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<S extends AgentState>
NodeHook.WrapCall<S> asHook()Returns a node hook applying this policy.static RetryPolicy.Builderbuilder()
-
Method Details
-
builder
-
asHook
Returns a node hook applying this policy.The hook waits for each attempt and back-off on the calling thread, which in a graph is the execution loop thread already waiting on the node, and returns a completed future. A timeout meant to bound each attempt belongs inside the retry, not around it.
- Type Parameters:
S- the state type- Returns:
- the retrying hook
-