Interface GrpcRetryPolicy.Builder

All Superinterfaces:
Buildable, CopyableBuilder<GrpcRetryPolicy.Builder,GrpcRetryPolicy>, SdkBuilder<GrpcRetryPolicy.Builder,GrpcRetryPolicy>, SdkPojo
Enclosing class:
GrpcRetryPolicy

public static interface GrpcRetryPolicy.Builder extends SdkPojo, CopyableBuilder<GrpcRetryPolicy.Builder,GrpcRetryPolicy>
  • Method Details

    • grpcRetryEventsWithStrings

      GrpcRetryPolicy.Builder grpcRetryEventsWithStrings(Collection<String> grpcRetryEvents)

      Specify at least one of the valid values.

      Parameters:
      grpcRetryEvents - Specify at least one of the valid values.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • grpcRetryEventsWithStrings

      GrpcRetryPolicy.Builder grpcRetryEventsWithStrings(String... grpcRetryEvents)

      Specify at least one of the valid values.

      Parameters:
      grpcRetryEvents - Specify at least one of the valid values.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • grpcRetryEvents

      GrpcRetryPolicy.Builder grpcRetryEvents(Collection<GrpcRetryPolicyEvent> grpcRetryEvents)

      Specify at least one of the valid values.

      Parameters:
      grpcRetryEvents - Specify at least one of the valid values.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • grpcRetryEvents

      GrpcRetryPolicy.Builder grpcRetryEvents(GrpcRetryPolicyEvent... grpcRetryEvents)

      Specify at least one of the valid values.

      Parameters:
      grpcRetryEvents - Specify at least one of the valid values.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • httpRetryEvents

      GrpcRetryPolicy.Builder httpRetryEvents(Collection<String> httpRetryEvents)

      Specify at least one of the following values.

      • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

      • gateway-error – HTTP status codes 502, 503, and 504

      • client-error – HTTP status code 409

      • stream-error – Retry on refused stream

      Parameters:
      httpRetryEvents - Specify at least one of the following values.

      • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

      • gateway-error – HTTP status codes 502, 503, and 504

      • client-error – HTTP status code 409

      • stream-error – Retry on refused stream

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • httpRetryEvents

      GrpcRetryPolicy.Builder httpRetryEvents(String... httpRetryEvents)

      Specify at least one of the following values.

      • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

      • gateway-error – HTTP status codes 502, 503, and 504

      • client-error – HTTP status code 409

      • stream-error – Retry on refused stream

      Parameters:
      httpRetryEvents - Specify at least one of the following values.

      • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

      • gateway-error – HTTP status codes 502, 503, and 504

      • client-error – HTTP status code 409

      • stream-error – Retry on refused stream

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxRetries

      GrpcRetryPolicy.Builder maxRetries(Long maxRetries)

      The maximum number of retry attempts.

      Parameters:
      maxRetries - The maximum number of retry attempts.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • perRetryTimeout

      GrpcRetryPolicy.Builder perRetryTimeout(Duration perRetryTimeout)

      The timeout for each retry attempt.

      Parameters:
      perRetryTimeout - The timeout for each retry attempt.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • perRetryTimeout

      default GrpcRetryPolicy.Builder perRetryTimeout(Consumer<Duration.Builder> perRetryTimeout)

      The timeout for each retry attempt.

      This is a convenience method that creates an instance of the Duration.Builder avoiding the need to create one manually via Duration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to perRetryTimeout(Duration).

      Parameters:
      perRetryTimeout - a consumer that will call methods on Duration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tcpRetryEventsWithStrings

      GrpcRetryPolicy.Builder tcpRetryEventsWithStrings(Collection<String> tcpRetryEvents)

      Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

      Parameters:
      tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tcpRetryEventsWithStrings

      GrpcRetryPolicy.Builder tcpRetryEventsWithStrings(String... tcpRetryEvents)

      Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

      Parameters:
      tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tcpRetryEvents

      GrpcRetryPolicy.Builder tcpRetryEvents(Collection<TcpRetryPolicyEvent> tcpRetryEvents)

      Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

      Parameters:
      tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tcpRetryEvents

      GrpcRetryPolicy.Builder tcpRetryEvents(TcpRetryPolicyEvent... tcpRetryEvents)

      Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

      Parameters:
      tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
      Returns:
      Returns a reference to this object so that method calls can be chained together.