Record Class Workflow.RecoverStrategy.MaxRetries

Object
Record
akka.javasdk.workflow.Workflow.RecoverStrategy.MaxRetries
Enclosing class:
Workflow.RecoverStrategy<T>

public static record Workflow.RecoverStrategy.MaxRetries(int maxRetries) extends Record
Retry strategy without failover configuration
  • Constructor Details

    • MaxRetries

      public MaxRetries(int maxRetries)
      Creates an instance of a MaxRetries record class.
      Parameters:
      maxRetries - the value for the maxRetries record component
  • Method Details

    • failoverTo

      @Deprecated public Workflow.RecoverStrategy<?> failoverTo(String stepName)
      Deprecated.
    • 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 public <T> Workflow.RecoverStrategy<T> failoverTo(String stepName, T input)
    • 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 method
      I - 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxRetries

      public int maxRetries()
      Returns the value of the maxRetries record component.
      Returns:
      the value of the maxRetries record component