Interface GrpcConfig.Retries

Enclosing interface:
GrpcConfig

public static interface GrpcConfig.Retries
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    @javax.validation.constraints.Positive int
     
    @NotNull @Pattern(regexp="status-codes|custom") String
    What type of retry policy to use.
    @NotNull Set<io.grpc.Status.Code>
     
  • Method Details

    • enabled

      @WithDefault("true") boolean enabled()
      Returns:
      If call retries are enabled.
    • policy

      @WithDefault("status-codes") @NotNull @Pattern(regexp="status-codes|custom") @NotNull @Pattern(regexp="status-codes|custom") String policy()
      What type of retry policy to use.
      1. status-codes - based on status codes (see StatusCodesRetryPredicate}
      2. custom - allows configuring custom policy
      If unset, noop policy will be used (never retries).
      Returns:
      The type of the GrpcRetryPredicate used.
    • statusCodes

      @WithDefault("UNAVAILABLE") @NotNull @NotNull Set<io.grpc.Status.Code> statusCodes()
      Returns:
      Set of status codes to execute retries for. Defaults to UNAVAILABLE, as this code means that the request never reached the bridge or C* responded with Unavailable exception, thus it should be safe to retry.
    • maxAttempts

      @WithDefault("1") @Positive @javax.validation.constraints.Positive int maxAttempts()
      Returns:
      Maximum amount of retry attempts.