Package akka.javasdk.workflow
Record Class Workflow.RecoverStrategy.MaxRetries
- Enclosing class:
Workflow.RecoverStrategy<T>
Retry strategy without failover configuration
-
Constructor Summary
ConstructorsConstructorDescriptionMaxRetries
(int maxRetries) Creates an instance of aMaxRetries
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.failoverTo
(akka.japi.function.Function<W, Workflow.StepEffect> lambda) Once max retries are exceeded, transition to a given step method.<W,
I> Workflow.RecoverStrategy.RecoveryInput <I> failoverTo
(akka.japi.function.Function2<W, I, Workflow.StepEffect> lambda) Once max retries are exceeded, transition to a given step method with input parameter.failoverTo
(String stepName) Deprecated.<T> Workflow.RecoverStrategy
<T> failoverTo
(String stepName, T input) Deprecated.usefailoverTo(akka.japi.function.Function2)
instead.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxRetries
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MaxRetries
public MaxRetries(int maxRetries) Creates an instance of aMaxRetries
record class.- Parameters:
maxRetries
- the value for themaxRetries
record component
-
-
Method Details
-
failoverTo
Deprecated.usefailoverTo(akka.japi.function.Function)
instead. -
failoverTo
public <W> Workflow.RecoverStrategy<Void> failoverTo(akka.japi.function.Function<W, Workflow.StepEffect> lambda) Once max retries are exceeded, transition to a given step method.- Type Parameters:
W
- The workflow type containing the step method- Parameters:
lambda
- Reference to the step method to transition to- Returns:
- A recovery strategy transitioning to the specified step
-
failoverTo
Deprecated.usefailoverTo(akka.japi.function.Function2)
instead. -
failoverTo
public <W,I> Workflow.RecoverStrategy.RecoveryInput<I> failoverTo(akka.japi.function.Function2<W, I, Workflow.StepEffect> lambda) Once max retries are exceeded, transition to a given step method with input parameter.- Type Parameters:
W
- The workflow type containing the step methodI
- The input parameter type for the step- Parameters:
lambda
- Reference to the step method to transition to- Returns:
- A builder to provide the input parameter for the recovery strategy
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
maxRetries
public int maxRetries()Returns the value of themaxRetries
record component.- Returns:
- the value of the
maxRetries
record component
-
failoverTo(akka.japi.function.Function)
instead.